Commit 8adc41bf authored by 李苏's avatar 李苏 💬

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

parents 5c4f029b c20733e5
...@@ -158,6 +158,12 @@ ...@@ -158,6 +158,12 @@
<version>1.0.0</version> <version>1.0.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.gavel.erp</groupId>
<artifactId>gavel-zlgl</artifactId>
<version>1.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>commons-fileupload</groupId> <groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <artifactId>commons-fileupload</artifactId>
......
package com.gavel.kwell.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.BaseURL;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.kwell.service.GpbhgcxService;
import com.gavel.kwell.vo.GpbhgcxVO;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("kmes/gpbhgcx")
public class GpbhgcxController extends BaseController {
@Autowired
private GpbhgcxService gpbhgcxService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "kmes/gpbhgcx/index";
}
@RequestMapping(value = BaseURL.GET, method = RequestMethod.POST)
@ResponseBody
public Object get(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
if ( records.getRecords()!=null && records.getRecords().size()>=1 ){
return buildReturnData(GpbhgcxVO.class, records.getRecords().get(0));
}
return buildReturnData(GpbhgmxVO.class, null);
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody JSONObject param) {
GpbhgmxCondition condition = DataConvert.getCondition(param, GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
return buildReturnData(records, GpbhgcxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.EXPORT, method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpbhgmxCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpbhgmxCondition.class);
RecordSet<GpbhgcxVO> records = gpbhgcxService.queryCx(condition);
doExport(request, response, param, records.getRecords());
}
}
package com.gavel.kwell.controller;
import com.alibaba.fastjson.JSONObject;
import com.gavel.common.SystemOperation;
import com.gavel.common.annotation.ResourcePermissions;
import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert;
import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GzzxCondition;
import com.gavel.gygl.vo.GzzxVO;
import com.gavel.kwell.service.GpfkcxService;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
@RequestMapping("kmes/")
public class GpfkcxController extends BaseController {
@Autowired
private GpfkcxService gpfkcxService;
@RequestMapping("gpfkcx/index")
public String index() {
return "kmes/gpfkcx/index";
}
@RequestMapping("gpfkcx/gpfkmxcx")
public String gpfkmxcx() {
return "kmes/gpfkcx/gpfkmxcx";
}
@RequestMapping("gpfkcx/gpfkyy")
public String gpfkyy() {
return "kmes/gpfkcx/gpfkyy";
}
@RequestMapping(value = "gpfkcx/query", method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkcxVO> records = gpfkcxService.queryCx(condition);
return buildReturnData(records, GpfkcxVO.class);
}
@RequestMapping(value = "gpfkcx/query/detail", method = RequestMethod.POST)
@ResponseBody
public Object queryDetail(@RequestBody GphyCondition condition) {
RecordSet<GphycxVO> records = gpfkcxService.queryDetail(condition);
return buildReturnData(records, GphycxVO.class);
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = "gpfkcx/export", method = RequestMethod.POST)
@ResponseBody
public void export(HttpServletRequest request,HttpServletResponse response, @RequestBody JSONObject param) throws Exception {
GpfkCondition condition = DataConvert.getCondition(param.getJSONObject("condition"), GpfkCondition.class);
RecordSet<GpfkcxVO> records = gpfkcxService.queryCx(condition);
doExport(request, response, param, records.getRecords());
}
@RequestMapping(value ="gpfkcx/queryGzzx", method = RequestMethod.POST)
@ResponseBody
public Object queryGzzx(@RequestBody JSONObject param) {
GzzxCondition condition = DataConvert.getCondition(param, GzzxCondition.class);
List<GzzxVO> records = gpfkcxService.queryGzzx(condition);
return buildReturnData(records, GzzxVO.class);
}
@RequestMapping(value ="gpfkcx/queryBzgx", method = RequestMethod.POST)
@ResponseBody
public Object queryBzgx(@RequestBody JSONObject param) {
BzgxCondition condition = DataConvert.getCondition(param, BzgxCondition.class);
List<BzgxVO> records = gpfkcxService.queryBzgx(condition);
return buildReturnData(records, BzgxVO.class);
}
@RequestMapping(value = "init/gxname", method = RequestMethod.POST)
@ResponseBody
public Object initGxname() {
return buildReturnData(gpfkcxService.listBzgxName());
}
}
...@@ -32,7 +32,7 @@ public class WlsnController extends BaseController { ...@@ -32,7 +32,7 @@ public class WlsnController extends BaseController {
@ResourcePermissions() @ResourcePermissions()
@RequestMapping("/index") @RequestMapping("/index")
public String index() { public String index() {
return "kmes/gjwlsn/index"; return "kmes/wlsn/index";
} }
@ResourcePermissions({SystemOperation.BottonResource.EDIT}) @ResourcePermissions({SystemOperation.BottonResource.EDIT})
......
package com.gavel.kwell.controller; package com.gavel.kwell.controller;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.gavel.kwell.vo.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -20,9 +22,6 @@ import com.gavel.common.base.controller.BaseController; ...@@ -20,9 +22,6 @@ import com.gavel.common.base.controller.BaseController;
import com.gavel.common.converter.DataConvert; import com.gavel.common.converter.DataConvert;
import com.gavel.common.utils.StringUtils; import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.service.GpfkService; import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.vo.GpWoCondition;
import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.HzWoVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -89,4 +88,55 @@ public class WosngzController extends BaseController { ...@@ -89,4 +88,55 @@ public class WosngzController extends BaseController {
List<GpfkVO> gpfkVOList = gpfkService.queryWosngzByWosnid(wosnid); List<GpfkVO> gpfkVOList = gpfkService.queryWosngzByWosnid(wosnid);
return buildReturnData(gpfkVOList, GpfkVO.class); return buildReturnData(gpfkVOList, GpfkVO.class);
} }
@ApiOperation(value = "查询工票维修详情,传入gpfkid")
@RequestMapping(value = "/getGpwxmxVO", method = RequestMethod.POST)
@ResponseBody
public Object getGpwxmxVOByGpid(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("工票信息不允许为空!");
return returnData();
}
GpWxInfoVO gpWxInfoVO = null;
// GpWxInfoVO gpWxInfoVO = gpfkService.getGpwxinfoByGpid(gpfkid);
return buildReturnData(gpWxInfoVO);
}
@ApiOperation(value = "查询工票装配详情,传入gpfkid")
@RequestMapping(value = "/getGphymx", method = RequestMethod.POST)
@ResponseBody
public Object getGphymx(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("工票信息不允许为空!");
return returnData();
}
List<GphyVO> gphyVOList = new ArrayList<>();
//List<GphyVO> gphyVOList = gpfkService.queryGphyListByGpid(gpfkid);
return buildReturnData(gphyVOList, GphyVO.class);
}
@ApiOperation(value = "查询工票检验详情,传入gpfkid")
@RequestMapping(value = "/getJyjgVO", method = RequestMethod.POST)
@ResponseBody
public Object getJyjgvoByGpid(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("工票信息不允许为空!");
return returnData();
}
GpfkJyjgVO gpfkJyjgVO =null;
//GpfkJyjgVO gpfkJyjgVO = gpfkService.getJyjgvoByGpid(gpfkid);
return buildReturnData(gpfkJyjgVO);
}
} }
package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.GpbhgcxVO;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
public interface GpbhgmxDao extends BaseDao {
public RecordSet<GpbhgmxVO> query(GpbhgmxCondition condition);
public RecordSet<GpbhgcxVO> queryCx(GpbhgmxCondition condition);
}
package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.persistence.sql.RecordSet;
import java.util.List;
public interface GpfkcxDao extends BaseDao {
public RecordSet<GpfkcxVO> queryCx(GpfkCondition condition);
public RecordSet<GpfkcxVO> queryGpfkDetil(GpfkCondition condition);
public List<BzgxVO> listBzgxName();
}
package com.gavel.kwell.dao;
import com.gavel.common.base.dao.BaseDao;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
public interface GphyDao extends BaseDao {
public RecordSet<GphyVO> query(GphyCondition condition);
public RecordSet<GphycxVO> queryDetail(GphyCondition condition);
public RecordSet<GphycxVO> queryGphy(GphyCondition condition);
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition);
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.GpbhgmxDao;
import com.gavel.kwell.vo.GpbhgcxVO;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
@Repository("gpbhgmxDao")
public class GpbhgmxDaoImpl extends BaseDaoImpl implements GpbhgmxDao {
public RecordSet<GpbhgmxVO> query(GpbhgmxCondition condition){
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPBHGMX_ID, GPBHGMX_MID, GPBHGMX_XXID, GPBHGMX_BHGLX, GPBHGMX_YYID, GPBHGMX_BHGSL, ");
sqlMap.append(" GPBHGMX_BZ, GPBHGMX_WHRID, GPBHGMX_WHR, GPBHGMX_WHSJ, GPBHGMX_CJRID, ");
sqlMap.append(" GPBHGMX_CJR, GPBHGMX_CJSJ, GPBHGMX_SYSVERSION, GPBHGMX_WXGPID ");
sqlMap.append("from GPBHGMX ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPBHGMX_ID", condition.getId()));
sqlMap.setParamValue("GPBHGMX_ID", condition.getId());
}
sqlMap.query(GpbhgmxVO.class);
return sqlMap.getRecordSet();
}
@Override
public RecordSet<GpbhgcxVO> queryCx(GpbhgmxCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select GPBHGMX_ID, GPBHGMX_MID, GPBHGMX_XXID, GPBHGMX_BHGLX, GPBHGMX_YYID, ");
sqlMap.append(" GPBHGMX_BZ, GPBHGMX_WHRID, GPBHGMX_WHR, GPBHGMX_WHSJ, GPBHGMX_CJRID, ");
sqlMap.append(" GPBHGMX_CJR, GPBHGMX_CJSJ, GPFK_FKR, GPFK_FKSJ, GPFK_WOSNID, GPFK_FKLX, GZZX_CODE, GZZX_NAME,");
sqlMap.append(" BZGX_CODE,BZGX_NAME, BHGXX_CODE, BHGXX_NAME, BHGYY_CODE, BHGYY_NAME, GPBHGMX_WXGPID,BX_NAME, ");
sqlMap.append(" GPFK_HGBZ,BHGXX_FLID,WLXX_CODE,WLXX_NAME,WLXX_GG, GPBHGMX_BZ ");
sqlMap.append("from GPBHGMX ");
sqlMap.append(" left join GPFK on GPFK_ID = GPBHGMX_MID ");
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 BX on BX_ID = GPFK_FKBX ");
sqlMap.append(" left join BZGX on BZGX_ID = GPFK_FKGX ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append(" left join BHGXX on BHGXX_ID = GPBHGMX_XXID ");
sqlMap.append(" left join BHGYY on BHGYY_ID = GPBHGMX_YYID ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPBHGMX_ID", condition.getId()));
sqlMap.setParamValue("GPBHGMX_ID", condition.getId());
}
if (StringUtils.isNotEmpty(condition.getMid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPBHGMX_MID", condition.getMid()));
sqlMap.setParamValue("GPBHGMX_MID", condition.getMid());
}
if ( StringUtils.isNotEmpty(condition.getGzzxid())){
sqlMap.append(" and " + SqlUtil.getWhereEqualSql("GZZX_ID", condition.getGzzxid().split(",")));
}
if (StringUtils.isNotEmpty(condition.getBzgxid())){
sqlMap.append(" and " + SqlUtil.getWhereEqualSql("BZGX_ID", condition.getBzgxid().split(",")));
}
if (StringUtils.isNotEmpty(condition.getBxid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPFK_FKBX", condition.getBxid()));
sqlMap.setParamValue("GPFK_FKBX", condition.getBxid());
}
if (StringUtils.isNotEmpty(condition.getWosnid())){
sqlMap.append(" and GPFK_WOSNID like :pWOSNID ");
sqlMap.setParamValueLike("pWOSNID", condition.getWosnid());
}
if (StringUtils.isNotEmpty(condition.getFkr())){
sqlMap.append(" and GPFK_FKR like :pFkr ");
sqlMap.setParamValueLike("pFkr", condition.getFkr());
}
if (StringUtils.isNotEmpty(condition.getFlid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("BHGXX_FLID", condition.getFlid()));
sqlMap.setParamValue("BHGXX_FLID", condition.getFlid());
}
if (StringUtils.isNotEmpty(condition.getXxName())){
sqlMap.append(" and BHGXX_NAME like :xxName ");
sqlMap.setParamValueLike("xxName", condition.getXxName());
}
if (StringUtils.isNotEmpty(condition.getWodjid())){
sqlMap.append(" and WO_DJID like :pDJID ");
sqlMap.setParamValueLike("pDJID", condition.getWodjid());
}
if (condition.getStart() != null) {
sqlMap.append(" and GPFK_FKSJ >= :pFKSJS ");
sqlMap.setParamValue("pFKSJS",condition.getStart());
}
if (condition.getEnd() != null) {
sqlMap.append(" and GPFK_FKSJ <= :pFJSJE ");
sqlMap.setParamValue("pFJSJE", condition.getEnd());
}
sqlMap.append(" order by GPFK_FKSJ desc ");
sqlMap.query(GpbhgcxVO.class);
return sqlMap.getRecordSet();
}
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository("gpfkcxDao")
public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
@Override
public RecordSet<GpfkcxVO> queryCx(GpfkCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append(" select GPFK_ID, GPFK_WOSNID, GPFK_FKSJ,GPFK_FKJSSJ, GPFK_HGBZ,GPFK_HGDJ, ");
sqlMap.append(" GPFK_FKSL,GPFK_HGSL, GPFK_BHGSL, GPFK_FKR, GPFK_FKGX,");
sqlMap.append(" BZGX_CODE, BZGX_NAME,GZZX_CODE,GZZX_NAME,GZZX_ID, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME,WLXX_GG,WO_DJID, BX_ID,BX_NAME");
sqlMap.append(" from GPFK ");
sqlMap.append(" left join BX on BX_ID = GPFK_FKBX ");
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 BZGX on BZGX_ID = GPFK_FKGX ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append(" where 1=1 ");
if ( StringUtils.isNotEmpty(condition.getGzzxid())){
sqlMap.append(" and " + SqlUtil.getWhereEqualSql("GZZX_ID", condition.getGzzxid().split(",")));
}
if (StringUtils.isNotEmpty(condition.getBzgxid())){
sqlMap.append(" and " + SqlUtil.getWhereEqualSql("GPFK_FKGX", condition.getBzgxid().split(",")));
}
if (StringUtils.isNotEmpty(condition.getBxid())){
sqlMap.append(" and " + SqlUtil.getWhereSql("BX_ID", condition.getBxid()));
sqlMap.setParamValue("BX_ID", condition.getBxid());
}
if (StringUtils.isNotEmpty(condition.getWosnid())){
sqlMap.append(" and GPFK_WOSNID like :pWOSNID ");
sqlMap.setParamValueLike("pWOSNID", condition.getWosnid());
}
if (StringUtils.isNotEmpty(condition.getFkr())){
sqlMap.append(" and GPFK_FKR like :pFkr ");
sqlMap.setParamValueLike("pFkr", condition.getFkr());
}
if (StringUtils.isNotEmpty(condition.getWlid())) {
sqlMap.append(" and (WLXX_CODE like :WLID or WLXX_NAME like :WLID) ");
sqlMap.setParamValueLike("WLID", condition.getWlid());
}
if (StringUtils.isNotEmpty(condition.getWodjid())){
sqlMap.append(" and " + SqlUtil.getWhereLikeSql("WO_DJID"));
sqlMap.setParamValueLike("WO_DJID", condition.getWodjid());
}
if (condition.getStart() != null) {
sqlMap.append(" and GPFK_FKSJ >= :pFKSJS ");
sqlMap.setParamValue("pFKSJS", condition.getStart());
}
if (condition.getEnd() != null) {
sqlMap.append(" and GPFK_FKSJ <= :pFJSJE ");
sqlMap.setParamValue("pFJSJE", condition.getEnd());
}
sqlMap.append("order by GPFK_FKSJ desc ");
sqlMap.query(GpfkcxVO.class);
return sqlMap.getRecordSet();
}
@Override
public RecordSet<GpfkcxVO> queryGpfkDetil(GpfkCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKGX,GPFK_FKSJ, ");
sqlMap.append(" GPFK_FKR,GPFK_FKRID, GPFK_FKBX,GPFK_FKJSSJ, GPFK_HGBZ,");
sqlMap.append(" GPFK_FKSL,GPFK_HGSL, GPFK_BHGSL,GPFK_GFSL, GPFK_LFSL, GPFK_FXSL,");
sqlMap.append(" GPFK_FGSL,GPFK_FKPH,GPFK_SCHS,GPFK_TMHS,GPFK_XJHS,GPFK_QTHS,GPFK_FKSJD ");
sqlMap.append("from GPFK ");
sqlMap.append(" left join ZYJHMX on ZYJHMX_GPCODE = GPFK_WOSNID ");
sqlMap.append("where GPFK_FKLX ='ZYJH' ");
sqlMap.append(" and GPFK_WOSNID like :pWOSNID ");
sqlMap.setParamValueLike("pWOSNID", condition.getWosnid());
sqlMap.query(GpfkcxVO.class);
return sqlMap.getRecordSet();
}
@Override
public List<BzgxVO> listBzgxName(){
SqlMap sqlMap = new SqlMap();
sqlMap.append("select distinct BZGX_NAME ");
sqlMap.append("from BZGX ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append("where 1 = 1 ");
sqlMap.append("order by BZGX_NAME ");
return sqlMap.query(BzgxVO.class);
}
}
package com.gavel.kwell.dao.impl;
import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.kwell.dao.GphyDao;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.persistence.sql.SqlMap;
import com.gavel.persistence.sql.SqlUtil;
import org.springframework.stereotype.Repository;
@Repository("gphyDao")
public class GphyDaoImpl extends BaseDaoImpl implements GphyDao {
public RecordSet<GphyVO> query(GphyCondition condition){
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPHY_ID, GPHY_MID, GPHY_WLSNID, GPHY_FKSJ, GPHY_ZPSL, ");
sqlMap.append(" GPHY_CXSL, GPHY_FKR, GPHY_FKGX, GPHY_BZ, GPHY_WHRID, ");
sqlMap.append(" GPHY_WHR, GPHY_WHSJ, GPHY_CJRID, GPHY_CJR, GPHY_CJSJ, ");
sqlMap.append(" GPHY_SYSVERSION, GPHY_WLID, GPHY_HYLX, GPHY_FKRID ");
sqlMap.append("from GPHY ");
sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(condition.getId())){
sqlMap.append(" and " + SqlUtil.getWhereSql("GPHY_ID", condition.getId()));
sqlMap.setParamValue("GPHY_ID", condition.getId());
}
sqlMap.query(GphyVO.class);
return sqlMap.getRecordSet();
}
@Override
public RecordSet<GphycxVO> queryDetail(GphyCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPHY_ID, GPHY_MID, GPHY_WLSNID, GPHY_FKSJ, GPHY_ZPSL, ");
sqlMap.append(" GPHY_CXSL, GPHY_FKR, GPHY_FKGX, GPHY_BZ, GPHY_WHRID, ");
sqlMap.append(" GPHY_WHR, GPHY_WHSJ, GPHY_CJRID, GPHY_CJR, GPHY_CJSJ, ");
sqlMap.append(" GPHY_SYSVERSION, GPHY_WLID, GPHY_HYLX, GPHY_FKRID, ");
sqlMap.append(" WLXX_CODE,WLXX_NAME ");
sqlMap.append("from GPHY ");
sqlMap.append(" left join WLXX on WLXX_ID = GPHY_WLID ");
sqlMap.append("where GPHY_MID = :GPHY_MID ");
sqlMap.setParamValue("GPHY_MID",condition.getMid());
sqlMap.query(GphyVO.class);
return sqlMap.getRecordSet();
}
@Override
public RecordSet<GphycxVO> queryGphy(GphyCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPHY_ID,GPHY_WLSNID,GPHY_WLID,GPHY_FKRID, GPHY_FKSJ, GPHY_FKR,");
sqlMap.append(" GPHY_ZPSL, GPHY_CXSL, GPHY_FKGX, GPHY_BZ,GPHY_WLID,GPHY_HYLX,BZGX_CODE,");
sqlMap.append(" BZGX_NAME, GZZX_CODE, GZZX_NAME,GPFK_WOSNID,WLXX_CODE,WLXX_NAME,WLXX_GG ");
sqlMap.append("from GPHY ");
sqlMap.append(" left join GPFK on GPFK_ID = GPHY_MID ");
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 = GPHY_WLID ");
sqlMap.append(" left join BZGX on BZGX_ID = GPFK_FKGX ");
sqlMap.append(" left join GZZX on GZZX_ID = BZGX_GZZXID ");
sqlMap.append("where WOSN_WOID = :WOSN_WOID ");
if (StringUtils.isNotEmpty(condition.getSnid())){
sqlMap.append(" and (GPHY_WLSNID like :pSnid or WLXX_CODE like :pSnid or WLXX_NAME like :pSnid) ");
sqlMap.setParamValueLike("pSnid", condition.getSnid());
}
sqlMap.setParamValue("WOSN_WOID",condition.getWoid());
sqlMap.append(" order by GPHY_WLSNID ");
sqlMap.query(GphycxVO.class);
return sqlMap.getRecordSet();
}
@Override
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition) {
SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select GPHY_ID,GPHY_WLSNID,GPHY_WLID,GPHY_FKRID, GPHY_FKSJ, GPHY_FKR,");
sqlMap.append(" GPHY_ZPSL, GPHY_CXSL, GPHY_FKGX, GPHY_BZ,GPHY_WLID,GPHY_HYLX, ");
sqlMap.append(" WLXX_CODE,WLXX_NAME,WLXX_GG ");
sqlMap.append("from GPHY ");
sqlMap.append(" left join WLXX on WLXX_ID = GPHY_WLID ");
sqlMap.append("where exists( ");
sqlMap.append(" select 1 from GPFK where GPFK_WOSNID = :pWOID and GPFK_ID = GPHY_MID ");
sqlMap.setParamValue("pWOID",condition.getWoid());
sqlMap.append(" )" );
if (StringUtils.isNotEmpty(condition.getSnid())){
sqlMap.append(" and (GPHY_WLSNID like :pSnid or WLXX_CODE like :pSnid or WLXX_NAME like :pSnid) ");
sqlMap.setParamValueLike("pSnid", condition.getSnid());
}
sqlMap.append(" order by GPHY_WLSNID ");
sqlMap.query(GphycxVO.class);
return sqlMap.getRecordSet();
}
}
...@@ -3,7 +3,6 @@ package com.gavel.kwell.dao.impl; ...@@ -3,7 +3,6 @@ package com.gavel.kwell.dao.impl;
import com.gavel.common.Constants; import com.gavel.common.Constants;
import com.gavel.common.base.dao.impl.BaseDaoImpl; import com.gavel.common.base.dao.impl.BaseDaoImpl;
import com.gavel.common.utils.StringUtils; import com.gavel.common.utils.StringUtils;
import com.gavel.jcsj.utils.WlsxUtils;
import com.gavel.kwell.dao.WlsnDao; import com.gavel.kwell.dao.WlsnDao;
import com.gavel.kwell.persistent.Wlsn; import com.gavel.kwell.persistent.Wlsn;
import com.gavel.kwell.vo.WlsnCondition; import com.gavel.kwell.vo.WlsnCondition;
...@@ -23,16 +22,14 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao { ...@@ -23,16 +22,14 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.setPageNo(condition.getPageNo()); sqlMap.setPageNo(condition.getPageNo());
sqlMap.setRowCount(condition.getPageSize()); sqlMap.setRowCount(condition.getPageSize());
sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, "); sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, ");
sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, WLSN_WLPH ,"); sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, WLSN_WLPH ,");
sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, "); sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, U_WLXX_JZNAME, "); sqlMap.append(" WLSN_CODEFLID, WLSN_CODEPREFIX, WLSN_HGDJ,WLSN_WHRID, ");
sqlMap.append(" WLXX_JLDW, JLDW_NAME, WLSN_CODEFLID, WLSN_CODEPREFIX, WLSN_HGDJ "); sqlMap.append(" WLSN_WHR,WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append(WlsxUtils.COMMON_SQL); sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG,WLXX_JLDW ");
sqlMap.append("from WLSN "); sqlMap.append("from WLSN ");
sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID "); sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID ");
sqlMap.append(" left join JLDW on JLDW_ID = WLXX_JLDW ");
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("WLSN_ID", condition.getId())); sqlMap.append(" and " + SqlUtil.getWhereSql("WLSN_ID", condition.getId()));
...@@ -65,12 +62,12 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao { ...@@ -65,12 +62,12 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao {
@Override @Override
public List<WlsnVO> queryWlsnByCodeList(String snCodeList,String snlx){ public List<WlsnVO> queryWlsnByCodeList(String snCodeList,String snlx){
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, "); sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, ");
sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, "); sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, ");
sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, "); sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, U_WLXX_JZNAME, "); sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG,WLSN_HGDJ, ");
sqlMap.append(" WLXX_JLDW, JLDW_NAME, WLSN_HGDJ "); sqlMap.append(" WLXX_JLDW, JLDW_NAME,WLSN_WHRID, WLSN_WHR,");
sqlMap.append(" WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append("from WLSN "); sqlMap.append("from WLSN ");
sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID "); sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID ");
sqlMap.append(" left join JLDW on JLDW_ID = WLXX_JLDW "); sqlMap.append(" left join JLDW on JLDW_ID = WLXX_JLDW ");
...@@ -89,8 +86,8 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao { ...@@ -89,8 +86,8 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, "); sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, ");
sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, "); sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, "); sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, WLSN_ZT, ");
sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, WLSN_HGDJ "); sqlMap.append(" WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, WLSN_HGDJ ");
sqlMap.append("from WLSN "); sqlMap.append("from WLSN ");
sqlMap.append("where 1 = 1 "); sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(snlx)) { if (StringUtils.isNotEmpty(snlx)) {
...@@ -108,13 +105,11 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao { ...@@ -108,13 +105,11 @@ public class WlsnDaoImpl extends BaseDaoImpl implements WlsnDao {
SqlMap sqlMap = new SqlMap(); SqlMap sqlMap = new SqlMap();
sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, "); sqlMap.append("select WLSN_ID, WLSN_WLID, WLSN_CODE, WLSN_BZ, WLSN_WHRID, ");
sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, "); sqlMap.append(" WLSN_WHR, WLSN_WHSJ, WLSN_CJRID, WLSN_CJR, WLSN_CJSJ, ");
sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY, "); sqlMap.append(" WLSN_SYSVERSION, WLSN_LYDJID, WLSN_DJLY,WLSN_HGDJ, ");
sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, "); sqlMap.append(" WLSN_ZT, WLSN_LX, WLSN_CODEFLID, WLSN_CODEPREFIX, ");
sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, U_WLXX_JZNAME, "); sqlMap.append(" WLXX_CODE, WLXX_NAME, WLXX_GG, WLXX_JLDW ");
sqlMap.append(" WLXX_JLDW, JLDW_NAME, WLSN_HGDJ ");
sqlMap.append("from WLSN "); sqlMap.append("from WLSN ");
sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID "); sqlMap.append(" left join WLXX on WLXX_ID = WLSN_WLID ");
sqlMap.append(" left join JLDW on JLDW_ID = WLXX_JLDW ");
sqlMap.append("where 1 = 1 "); sqlMap.append("where 1 = 1 ");
if (StringUtils.isNotEmpty(snlx)) { if (StringUtils.isNotEmpty(snlx)) {
sqlMap.append(" and WLSN_LX = :WLSN_LX"); sqlMap.append(" and WLSN_LX = :WLSN_LX");
......
package com.gavel.kwell.persistent;
import com.gavel.common.base.entity.BaseEntity;
import com.gavel.common.utils.CodeStrategy;
import com.gavel.persistence.annotation.FieldMeta;
import com.gavel.persistence.annotation.TableMeta;
import java.util.Date;
@TableMeta(id = "GPHY", name = "GPHY")
public class Gphy extends BaseEntity {
private static final long serialVersionUID = 1L;
@FieldMeta(fieldName = "GPHY_ID", caption = "ID", primaryKey = true, notEmpty = true, codeStrategy = CodeStrategy.UUID)
private String id;
@FieldMeta(fieldName = "GPHY_MID", caption = "工票编码")
private String mid;
@FieldMeta(fieldName = "GPHY_WLSNID", caption = "物料SN")
private String wlsnid;
@FieldMeta(fieldName = "GPHY_WLID", caption = "物料ID")
private String wlid;
@FieldMeta(fieldName = "GPHY_FKSJ", caption = "反馈时间")
private Date fksj;
@FieldMeta(fieldName = "GPHY_ZPSL", caption = "装配数量")
private Double zpsl;
@FieldMeta(fieldName = "GPHY_CXSL", caption = "拆卸数量")
private Double cxsl;
@FieldMeta(fieldName = "GPHY_FKR", caption = "反馈人")
private String fkr;
@FieldMeta(fieldName = "GPHY_FKRID", caption = "反馈人编码")
private String fkrid;
@FieldMeta(fieldName = "GPHY_FKGX", caption = "反馈工序")
private String fkgx;
@FieldMeta(fieldName = "GPHY_BZ", caption = "备注")
private String bz;
@FieldMeta(fieldName = "GPHY_WHRID", caption = "维护人编码", autoUserId = true)
private String whrid;
@FieldMeta(fieldName = "GPHY_WHR", caption = "维护人", autoUserName = true)
private String whr;
@FieldMeta(fieldName = "GPHY_WHSJ", caption = "维护时间", autoDateTime = true)
private Date whsj;
@FieldMeta(fieldName = "GPHY_CJRID", caption = "创建人编码", autoUserId = true, initial = true)
private String cjrid;
@FieldMeta(fieldName = "GPHY_CJR", caption = "创建人", autoUserName = true, initial = true)
private String cjr;
@FieldMeta(fieldName = "GPHY_CJSJ", caption = "创建时间", autoDateTime = true, initial = true)
private Date cjsj;
@FieldMeta(fieldName = "GPHY_SYSVERSION", caption = "系统版本")
private Integer sysversion;
@FieldMeta(fieldName = "GPHY_HYLX", caption = "耗用类型")
private String hylx;
@FieldMeta(fieldName = "GPHY_WLPH", caption = "物料批号")
private String wlph;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getWlsnid() {
return wlsnid;
}
public void setWlsnid(String wlsnid) {
this.wlsnid = wlsnid;
}
public Date getFksj() {
return fksj;
}
public void setFksj(Date fksj) {
this.fksj = fksj;
}
public String getFkr() {
return fkr;
}
public void setFkr(String fkr) {
this.fkr = fkr;
}
public String getFkgx() {
return fkgx;
}
public void setFkgx(String fkgx) {
this.fkgx = fkgx;
}
public String getBz() {
return bz;
}
public void setBz(String bz) {
this.bz = bz;
}
public String getWhrid() {
return whrid;
}
public void setWhrid(String whrid) {
this.whrid = whrid;
}
public String getWhr() {
return whr;
}
public void setWhr(String whr) {
this.whr = whr;
}
public Date getWhsj() {
return whsj;
}
public void setWhsj(Date whsj) {
this.whsj = whsj;
}
public String getCjrid() {
return cjrid;
}
public void setCjrid(String cjrid) {
this.cjrid = cjrid;
}
public String getCjr() {
return cjr;
}
public void setCjr(String cjr) {
this.cjr = cjr;
}
public Date getCjsj() {
return cjsj;
}
public void setCjsj(Date cjsj) {
this.cjsj = cjsj;
}
public Integer getSysversion() {
return sysversion;
}
public void setSysversion(Integer sysversion) {
this.sysversion = sysversion;
}
public Double getZpsl() {
return zpsl;
}
public void setZpsl(Double zpsl) {
this.zpsl = zpsl;
}
public Double getCxsl() {
return cxsl;
}
public void setCxsl(Double cxsl) {
this.cxsl = cxsl;
}
public String getWlid() {
return wlid;
}
public void setWlid(String wlid) {
this.wlid = wlid;
}
public String getHylx() {
return hylx;
}
public void setHylx(String hylx) {
this.hylx = hylx;
}
public String getFkrid() {
return fkrid;
}
public void setFkrid(String fkrid) {
this.fkrid = fkrid;
}
public String getWlph() {
return wlph;
}
public void setWlph(String wlph) {
this.wlph = wlph;
}
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.GpbhgcxVO;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.persistence.sql.RecordSet;
public interface GpbhgcxService extends BaseEditService {
public RecordSet<GpbhgcxVO> queryCx(GpbhgmxCondition condition);
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.persistent.Gpbhgmx;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
import java.util.List;
public interface GpbhgmxService extends BaseEditService {
public RecordSet<GpbhgmxVO> query(GpbhgmxCondition condition);
public void doInsGpbhg(List<Gpbhgmx> gpbhgmxList);
public boolean validGpbhgmx(List<Gpbhgmx> gpbhgmxList);
public List<Gpbhgmx> getGpbhgFromVo(Gpfk gpfk, List<GpbhgmxVO> gpbhgmxVOList);
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GzzxCondition;
import com.gavel.gygl.vo.GzzxVO;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import java.util.List;
public interface GpfkcxService extends BaseEditService {
public RecordSet<GpfkcxVO> queryCx(GpfkCondition condition);
public RecordSet<GphycxVO> queryDetail(GphyCondition condition);
public List<GzzxVO> queryGzzx(GzzxCondition condition);
public List<BzgxVO> queryBzgx(BzgxCondition condition);
public RecordSet<GphycxVO> queryGphy(GphyCondition condition);
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition);
public RecordSet<GpfkcxVO> queryGpfkDetil(GpfkCondition condition);
public List<BzgxVO> listBzgxName();
}
package com.gavel.kwell.service;
import com.gavel.common.base.service.BaseEditService;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
public interface GphyService extends BaseEditService {
public RecordSet<GphyVO> query(GphyCondition condition);
public RecordSet<GphycxVO> queryDetail(GphyCondition condition);
public RecordSet<GphycxVO> queryGphy(GphyCondition condition);
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition);
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.kwell.dao.GpbhgmxDao;
import com.gavel.kwell.persistent.Gpbhgmx;
import com.gavel.kwell.service.GpbhgcxService;
import com.gavel.kwell.vo.GpbhgcxVO;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("gpbhgcxService")
@Transactional
public class GpbhgcxServiceImpl extends BaseEditServiceImpl implements GpbhgcxService {
@Autowired
private GpbhgmxDao gpbhgmxDao;
@Override
public void initService() {
addMaster( Gpbhgmx.class);
}
@Override
public RecordSet<GpbhgcxVO> queryCx(GpbhgmxCondition condition) {
return gpbhgmxDao.queryCx(condition);
}
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.dao.GpbhgmxDao;
import com.gavel.kwell.persistent.Gpbhgmx;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.kwell.service.GpbhgmxService;
import com.gavel.kwell.utils.GpbhglxEnum;
import com.gavel.kwell.vo.GpbhgmxCondition;
import com.gavel.kwell.vo.GpbhgmxVO;
import com.gavel.persistence.sql.RecordSet;
import com.gavel.zlgl.service.BhgxxService;
import com.gavel.zlgl.service.BhgyyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
@Service("gpbhgmxService")
@Transactional
public class GpbhgmxServiceImpl extends BaseEditServiceImpl implements GpbhgmxService {
@Autowired
private GpbhgmxDao gpbhgmxDao;
@Autowired
private BhgxxService bhgxxService;
@Autowired
private BhgyyService bhgyyService;
@Override
public void initService() {
addMaster( Gpbhgmx.class);
}
@Override
public RecordSet<GpbhgmxVO> query(GpbhgmxCondition condition) {
return gpbhgmxDao.query(condition);
}
@Override
public void doInsGpbhg(List<Gpbhgmx> gpbhgmxList){
if(validGpbhgmx(gpbhgmxList)){
gpbhgmxDao.batchAdd(gpbhgmxList);
}else{
throwReturnMessage(ThreadContext.getReturnData().getMessage());
}
}
@Override
public boolean validGpbhgmx(List<Gpbhgmx> gpbhgmxList){
if(gpbhgmxList != null && gpbhgmxList.size() > 0){
if (!bhgxxService.batchValidBhgxxByList(gpbhgmxList,true)){
return false;
}
if (!bhgyyService.batchValidBhgyyByList(gpbhgmxList,true)){
return false;
}
// for(Gpbhgmx gpbhgmx:gpbhgmxList){
// if(NumberUtils.lessEqual(gpbhgmx.getBhgsl(),0d)){
// setReturnMessage("不合格数量不允许小于或等于0,请重新输入!");
// return false;
// }
// }
}
return true;
}
@Override
public List<Gpbhgmx> getGpbhgFromVo(Gpfk gpfk, List<GpbhgmxVO> gpbhgmxVOList){
List<Gpbhgmx> gpbhgmxList = new ArrayList<Gpbhgmx>(gpbhgmxVOList.size());
double gfsl = 0d, lfsl = 0d, fxsl = 0d, fgsl = 0d;
for (GpbhgmxVO gpbhgmxVO : gpbhgmxVOList) {
Gpbhgmx gpbhgmx = new Gpbhgmx();
gpbhgmx.setMid(gpfk.getId());
gpbhgmx.setXxid(gpbhgmxVO.getXxid());
gpbhgmx.setYyid(gpbhgmxVO.getYyid());
gpbhgmx.setBhgsl(gpbhgmxVO.getBhgsl());
gpbhgmx.setBz(gpbhgmxVO.getBz());
gpbhgmx.setBhglx(gpbhgmxVO.getBhglx());
if(StringUtils.isNotEmpty(gpbhgmxVO.getBhglx())){
gpbhgmx.setBhglx(gpbhgmxVO.getBhglx());
}else{
gpbhgmx.setBhglx(GpbhglxEnum.FG.getId());
}
if(StringUtils.equalsIgnoreCase(gpbhgmx.getBhglx(),GpbhglxEnum.FX.getId())){
fxsl = fxsl + gpbhgmx.getBhgsl();
}else if(StringUtils.equalsIgnoreCase(gpbhgmx.getBhglx(),GpbhglxEnum.FG.getId())){
fgsl = fgsl + gpbhgmx.getBhgsl();
}else if(StringUtils.equalsIgnoreCase(gpbhgmx.getBhglx(),GpbhglxEnum.GF.getId())){
gfsl = gfsl + gpbhgmx.getBhgsl();
}else if(StringUtils.equalsIgnoreCase(gpbhgmx.getBhglx(),GpbhglxEnum.LF.getId())){
lfsl = lfsl + gpbhgmx.getBhgsl();
}
gpbhgmxList.add(gpbhgmx);
}
gpfk.setGfsl(gfsl);
gpfk.setLfsl(lfsl);
gpfk.setFxsl(fxsl);
gpfk.setFgsl(fgsl);
return gpbhgmxList;
}
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.gygl.persistent.Gzzx;
import com.gavel.gygl.service.BzgxService;
import com.gavel.gygl.vo.BzgxCondition;
import com.gavel.gygl.vo.BzgxVO;
import com.gavel.gygl.vo.GzzxCondition;
import com.gavel.gygl.vo.GzzxVO;
import com.gavel.kwell.dao.GpfkcxDao;
import com.gavel.kwell.service.GpfkcxService;
import com.gavel.kwell.service.GphyService;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkcxVO;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service("gpfkcxService")
@Transactional
public class GpfkcxServiceImpl extends BaseEditServiceImpl implements GpfkcxService {
@Autowired
private GpfkcxDao gpfkcxDao;
@Autowired
private GphyService gphyService;
@Autowired
private BzgxService bzgxService;
@Override
public void initService() {
}
@Override
public RecordSet<GpfkcxVO> queryCx(GpfkCondition condition) {
return gpfkcxDao.queryCx(condition);
}
@Override
public RecordSet<GphycxVO> queryDetail(GphyCondition condition) {
return gphyService.queryDetail(condition);
}
@Override
public RecordSet<GphycxVO> queryGphy(GphyCondition condition) {
return gphyService.queryGphy(condition);
}
@Override
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition) {
return gphyService.queryGphyMx(condition);
}
@Override
public List<GzzxVO> queryGzzx(GzzxCondition condition) {
return gpfkcxDao.queryListByEntity(new Gzzx());
}
@Override
public List<BzgxVO> queryBzgx(BzgxCondition condition) {
return bzgxService.queryNotTybzBzgx(condition).getRecords();
}
@Override
public RecordSet<GpfkcxVO> queryGpfkDetil(GpfkCondition condition) {
return gpfkcxDao.queryGpfkDetil(condition);
}
@Override
public List<BzgxVO> listBzgxName() {
return gpfkcxDao.listBzgxName();
}
}
package com.gavel.kwell.service.impl;
import com.gavel.common.base.service.impl.BaseEditServiceImpl;
import com.gavel.kwell.dao.GphyDao;
import com.gavel.kwell.persistent.Gphy;
import com.gavel.kwell.service.GphyService;
import com.gavel.kwell.vo.GphyCondition;
import com.gavel.kwell.vo.GphyVO;
import com.gavel.kwell.vo.GphycxVO;
import com.gavel.persistence.sql.RecordSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service("gphyService")
@Transactional
public class GphyServiceImpl extends BaseEditServiceImpl implements GphyService {
@Autowired
private GphyDao gphyDao;
@Override
public void initService() {
addMaster( Gphy.class);
}
@Override
public RecordSet<GphyVO> query(GphyCondition condition) {
return gphyDao.query(condition);
}
@Override
public RecordSet<GphycxVO> queryDetail(GphyCondition condition) {
return gphyDao.queryDetail(condition);
}
@Override
public RecordSet<GphycxVO> queryGphy(GphyCondition condition) {
return gphyDao.queryGphy(condition);
}
@Override
public RecordSet<GphycxVO> queryGphyMx(GphyCondition condition) {
return gphyDao.queryGphyMx(condition);
}
}
package com.gavel.kwell.utils;
import com.gavel.kzzx.model.GavelEnumModel;
import java.util.ArrayList;
import java.util.List;
public enum GpbhglxEnum {
FX("返修", "FX"),
GF("工废", "GF"),
LF("料废","LF"),
FG("返工","FG");
private String id; //数据库存储
private String name;
GpbhglxEnum(String name, String id) {
this.id = id;
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static List<GavelEnumModel> toList(){
List<GavelEnumModel> list = new ArrayList<>();
for (GpbhglxEnum e : GpbhglxEnum.values()) {
GavelEnumModel gavelEnumModel = new GavelEnumModel();
gavelEnumModel.setId(e.getId());
gavelEnumModel.setName(e.getName());
list.add(gavelEnumModel);
}
return list;
}
}
package com.gavel.kwell.vo;
import com.gavel.jcsj.vo.WxxmVO;
import java.util.List;
public class GpWxInfoVO {
private static final long serialVersionUID = 1L;
private HzWoVO HzWoVO;
private GpfkVO gpfkVO;
private List<GpwxmxVO> gpwxmxVOList;
private List<GpbhgmxVO> gpbhgmxVOList;
private List<WxxmVO> wxxmVOList;
private List<GphyVO> gphyVOList;
public HzWoVO getHzWoVO() {
return HzWoVO;
}
public void setHzWoVO(HzWoVO HzWoVO) {
this.HzWoVO = HzWoVO;
}
public List<GpbhgmxVO> getGpbhgmxVOList() {
return gpbhgmxVOList;
}
public void setGpbhgmxVOList(List<GpbhgmxVO> gpbhgmxVOList) {
this.gpbhgmxVOList = gpbhgmxVOList;
}
public GpfkVO getGpfkVO() {
return gpfkVO;
}
public void setGpfkVO(GpfkVO gpfkVO) {
this.gpfkVO = gpfkVO;
}
public List<GpwxmxVO> getGpwxmxVOList() {
return gpwxmxVOList;
}
public void setGpwxmxVOList(List<GpwxmxVO> gpwxmxVOList) {
this.gpwxmxVOList = gpwxmxVOList;
}
public List<WxxmVO> getWxxmVOList() {
return wxxmVOList;
}
public void setWxxmVOList(List<WxxmVO> wxxmVOList) {
this.wxxmVOList = wxxmVOList;
}
public List<GphyVO> getGphyVOList() {
return gphyVOList;
}
public void setGphyVOList(List<GphyVO> gphyVOList) {
this.gphyVOList = gphyVOList;
}
}
package com.gavel.kwell.vo;
import com.gavel.zlgl.vo.BhgmxVO;
import com.gavel.zlgl.vo.JydVO;
import com.gavel.zlgl.vo.JydmxVO;
import java.util.List;
public class GpfkJyjgVO {
private static final long serialVersionUID = 1L;
private String mid;
private GpfkVO gpfkVO;
private List<BhgmxVO> bhgmxVOList;
private List<GpbhgmxVO> gpbhgmxVOList;
private JydVO jydVO;
private List<JydmxVO> jydmxVOList;
public JydVO getJydVO() {
return jydVO;
}
public void setJydVO(JydVO jydVO) {
this.jydVO = jydVO;
}
public List<JydmxVO> getJydmxVOList() {
return jydmxVOList;
}
public void setJydmxVOList(List<JydmxVO> jydmxVOList) {
this.jydmxVOList = jydmxVOList;
}
public GpfkVO getGpfkVO() {
return gpfkVO;
}
public void setGpfkVO(GpfkVO gpfkVO) {
this.gpfkVO = gpfkVO;
}
public List<BhgmxVO> getBhgmxVOList() {
return bhgmxVOList;
}
public void setBhgmxVOList(List<BhgmxVO> bhgmxVOList) {
this.bhgmxVOList = bhgmxVOList;
}
public List<GpbhgmxVO> getGpbhgmxVOList() {
return gpbhgmxVOList;
}
public void setGpbhgmxVOList(List<GpbhgmxVO> gpbhgmxVOList) {
this.gpbhgmxVOList = gpbhgmxVOList;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Gpfk;
import com.gavel.persistence.annotation.FieldMeta;
public class GpfkcxVO extends Gpfk {
@FieldMeta(fieldName = "WOSN_CODE", caption = "序列号")
private String wosnCode;
@FieldMeta(fieldName = "BZGX_CODE", caption = "工序编码")
private String bzgxCode;
@FieldMeta(fieldName = "BZGX_NAME", caption = "工序名称")
private String bzgxName;
@FieldMeta(fieldName = "GZZX_CODE", caption = "工作中心")
private String gzzxCode;
@FieldMeta(fieldName = "GZZX_NAME", caption = "工作中心")
private String gzzxName;
@FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码")
private String wlxxCode;
@FieldMeta(fieldName = "WLXX_NAME", caption = "物料名称")
private String wlxxName;
@FieldMeta(fieldName = "WLXX_GG", caption = "物料规格")
private String wlxxGg;
@FieldMeta(fieldName = "WO_DJID", caption = "任务单号")
private String woDjid;
@FieldMeta(fieldName = "WOGYLX_XQSL", caption = "订单数量")
private Integer xqsl;
@FieldMeta(fieldName = "GXHS",caption = "工序耗时")
private Double gxhs;
@FieldMeta(fieldName = "BX_NAME", caption = "班型")
private String bxName;
@FieldMeta(fieldName = "BHGXX_NAME", caption = "不合格现象名称")
private String bhgxxName;
@FieldMeta(fieldName = "BHGYY_NAME", caption = "不合格原因名称")
private String bhgyyName;
public String getWosnCode() {
return wosnCode;
}
public void setWosnCode(String wosnCode) {
this.wosnCode = wosnCode;
}
public String getBzgxCode() {
return bzgxCode;
}
public void setBzgxCode(String bzgxCode) {
this.bzgxCode = bzgxCode;
}
public String getBzgxName() {
return bzgxName;
}
public void setBzgxName(String bzgxName) {
this.bzgxName = bzgxName;
}
public String getGzzxCode() {
return gzzxCode;
}
public void setGzzxCode(String gzzxCode) {
this.gzzxCode = gzzxCode;
}
public String getGzzxName() {
return gzzxName;
}
public void setGzzxName(String gzzxName) {
this.gzzxName = gzzxName;
}
public String getWlxxCode() {
return wlxxCode;
}
public void setWlxxCode(String wlxxCode) {
this.wlxxCode = wlxxCode;
}
public String getWlxxName() {
return wlxxName;
}
public void setWlxxName(String wlxxName) {
this.wlxxName = wlxxName;
}
public String getWlxxGg() {
return wlxxGg;
}
public void setWlxxGg(String wlxxGg) {
this.wlxxGg = wlxxGg;
}
public String getWoDjid() {
return woDjid;
}
public void setWoDjid(String woDjid) {
this.woDjid = woDjid;
}
public Integer getXqsl() {
return xqsl;
}
public void setXqsl(Integer xqsl) {
this.xqsl = xqsl;
}
public Double getGxhs() {
return gxhs;
}
public void setGxhs(Double gxhs) {
this.gxhs = gxhs;
}
public String getBxName() {
return bxName;
}
public void setBxName(String bxName) {
this.bxName = bxName;
}
public String getBhgxxName() {
return bhgxxName;
}
public void setBhgxxName(String bhgxxName) {
this.bhgxxName = bhgxxName;
}
public String getBhgyyName() {
return bhgyyName;
}
public void setBhgyyName(String bhgyyName) {
this.bhgyyName = bhgyyName;
}
}
package com.gavel.kwell.vo;
import com.gavel.common.base.entity.BaseEntity;
public class GphyCondition extends BaseEntity {
private static final long serialVersionUID = 1L;
private String id;
private String wlid;
private String hylx;
private String fkrid;
private String gxid;
private String mid;
private String woid;
private String snid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getWlid() {
return wlid;
}
public void setWlid(String wlid) {
this.wlid = wlid;
}
public String getHylx() {
return hylx;
}
public void setHylx(String hylx) {
this.hylx = hylx;
}
public String getFkrid() {
return fkrid;
}
public void setFkrid(String fkrid) {
this.fkrid = fkrid;
}
public String getGxid() {
return gxid;
}
public void setGxid(String gxid) {
this.gxid = gxid;
}
public String getMid() {
return mid;
}
public void setMid(String mid) {
this.mid = mid;
}
public String getWoid() {
return woid;
}
public void setWoid(String woid) {
this.woid = woid;
}
public String getSnid() {
return snid;
}
public void setSnid(String snid) {
this.snid = snid;
}
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Gphy;
import com.gavel.persistence.annotation.FieldMeta;
public class GphyVO extends Gphy {
private static final long serialVersionUID = 1L;
@FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码")
private String wlxxCode;
@FieldMeta(fieldName = "WLXX_NAME", caption = "物料名称")
private String wlxxName;
@FieldMeta(fieldName = "WLXX_GG", caption = "物料规格")
private String wlxxGg;
@FieldMeta(fieldName = "WLSN_HGDJ", caption = "合格等级")
private String hgdj;
public String getWlxxCode() {
return wlxxCode;
}
public void setWlxxCode(String wlxxCode) {
this.wlxxCode = wlxxCode;
}
public String getWlxxName() {
return wlxxName;
}
public void setWlxxName(String wlxxName) {
this.wlxxName = wlxxName;
}
public String getWlxxGg() {
return wlxxGg;
}
public void setWlxxGg(String wlxxGg) {
this.wlxxGg = wlxxGg;
}
public String getHgdj() {
return hgdj;
}
public void setHgdj(String hgdj) {
this.hgdj = hgdj;
}
}
package com.gavel.kwell.vo;
import com.gavel.kwell.persistent.Gphy;
import com.gavel.persistence.annotation.FieldMeta;
public class GphycxVO extends Gphy {
private static final long serialVersionUID = 1L;
@FieldMeta(fieldName = "U_WLXX_JZNAME", caption = "机种名称" )
private String jzname;
@FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码")
private String wlxxCode;
@FieldMeta(fieldName = "WLXX_NAME", caption = "物料名称")
private String wlxxName;
@FieldMeta(fieldName = "GPFK_WOSNID", caption = "序列号")
private String wosnid;
@FieldMeta(fieldName = "BZGX_CODE", caption = "工序编码")
private String bzgxCode;
@FieldMeta(fieldName = "BZGX_NAME", caption = "工序名称")
private String bzgxName;
@FieldMeta(fieldName = "GZZX_CODE", caption = "工作中心")
private String gzzxCode;
@FieldMeta(fieldName = "GZZX_NAME", caption = "工作中心")
private String gzzxName;
public String getJzname() {
return jzname;
}
public void setJzname(String jzname) {
this.jzname = jzname;
}
public String getWlxxCode() {
return wlxxCode;
}
public void setWlxxCode(String wlxxCode) {
this.wlxxCode = wlxxCode;
}
public String getWlxxName() {
return wlxxName;
}
public void setWlxxName(String wlxxName) {
this.wlxxName = wlxxName;
}
public String getBzgxCode() {
return bzgxCode;
}
public void setBzgxCode(String bzgxCode) {
this.bzgxCode = bzgxCode;
}
public String getBzgxName() {
return bzgxName;
}
public void setBzgxName(String bzgxName) {
this.bzgxName = bzgxName;
}
public String getGzzxCode() {
return gzzxCode;
}
public void setGzzxCode(String gzzxCode) {
this.gzzxCode = gzzxCode;
}
public String getGzzxName() {
return gzzxName;
}
public void setGzzxName(String gzzxName) {
this.gzzxName = gzzxName;
}
public String getWosnid() {
return wosnid;
}
public void setWosnid(String wosnid) {
this.wosnid = wosnid;
}
}
...@@ -11,18 +11,11 @@ public class WlsnVO extends Wlsn { ...@@ -11,18 +11,11 @@ public class WlsnVO extends Wlsn {
@FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码" ) @FieldMeta(fieldName = "WLXX_CODE", caption = "物料编码" )
private String wlcode; private String wlcode;
@FieldMeta(fieldName = "WLXX_NAME", caption = "名称" ) @FieldMeta(fieldName = "WLXX_NAME", caption = "物料名称" )
private String wlname; private String wlname;
@FieldMeta(fieldName = "U_WLXX_JZNAME", caption = "机种" )
private String jzname;
@FieldMeta(fieldName = "WLXX_GG", caption = "规格" )
private String wlgg;
@FieldMeta(fieldName = "JLDW_NAME", caption = "计量单位")
private String jldwname;
@FieldMeta(fieldName = "WLXX_JLDW", caption = "计量单位")
private String wljldw;
@FieldMeta(fieldName = "WLXX_GG", caption = "物料规格" )
private String wlgg;
public String getWlcode() { public String getWlcode() {
return wlcode; return wlcode;
...@@ -40,14 +33,6 @@ public class WlsnVO extends Wlsn { ...@@ -40,14 +33,6 @@ public class WlsnVO extends Wlsn {
this.wlname = wlname; this.wlname = wlname;
} }
public String getJzname() {
return jzname;
}
public void setJzname(String jzname) {
this.jzname = jzname;
}
public String getWlgg() { public String getWlgg() {
return wlgg; return wlgg;
} }
...@@ -56,19 +41,5 @@ public class WlsnVO extends Wlsn { ...@@ -56,19 +41,5 @@ public class WlsnVO extends Wlsn {
this.wlgg = wlgg; this.wlgg = wlgg;
} }
public String getJldwname() {
return jldwname;
}
public void setJldwname(String jldwname) {
this.jldwname = jldwname;
}
public String getWljldw() {
return wljldw;
}
public void setWljldw(String wljldw) {
this.wljldw = wljldw;
}
} }
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
</menu> </menu>
<menu mkid="901001000" mkmc="工票记录查询" url="kmes/gpfkcx/index"> <menu mkid="901001000" mkmc="工票记录查询" url="kmes/gpfkcx/index">
<print entity="com.gavel.kwell.vo.GpfkcxVO"/>
</menu> </menu>
<menu mkid="901001200" mkmc="车间看板" url="kmes/dashboard/index"> <menu mkid="901001200" mkmc="车间看板" url="kmes/dashboard/index">
...@@ -41,6 +42,5 @@ ...@@ -41,6 +42,5 @@
<menu mkid="290040100" mkmc="生产入库登记"/> <menu mkid="290040100" mkmc="生产入库登记"/>
<menu mkid="290060500" mkmc="生产领料登记"/> <menu mkid="290060500" mkmc="生产领料登记"/>
<menu mkid="290060500" mkmc="生产领料登记"/> <menu mkid="290060500" mkmc="生产领料登记"/>
<menu mkid="512000000" mkmc="车间作业"/>
</disableMenus> </disableMenus>
</module> </module>
...@@ -15,17 +15,7 @@ ...@@ -15,17 +15,7 @@
var $dialog=$div.parent(),params=$dialog.dialog("options").queryParams, queryUrl = 'kmes/gpfkcx/query/detail'; var $dialog=$div.parent(),params=$dialog.dialog("options").queryParams, queryUrl = 'kmes/gpfkcx/query/detail';
var columns = [ var columns = [
{title: "条码", field: "wlsnid", fieldType: "ftString",width:180}, {title: "条码", field: "wlsnid", fieldType: "ftString",width:180},
{title: "类型", field: "hylx",align:'center', fieldType: "ftString",width:80,formatter:function (value) {
var text={
"BOM":"关键件",
"LINK":"关联件",
"MAC":"MAC地址",
"MZ":"模组码"
};
return text[value]||''
}},
{title: "物料编码", field: "wlxxCode", width: 120}, {title: "物料编码", field: "wlxxCode", width: 120},
{title: "机种", field: "jzname", width: 140},
{title: "物料名称", field: "wlxxName", width: 140}, {title: "物料名称", field: "wlxxName", width: 140},
{title: "装配数量", field: "zpsl", fieldType: "int"}, {title: "装配数量", field: "zpsl", fieldType: "int"},
{title: "拆卸数量", field: "cxsl", fieldType: "int"}, {title: "拆卸数量", field: "cxsl", fieldType: "int"},
......
<div id="cjzyGpfkcx" class="gui-div"> <div id="kmesGpfkcx" class="gui-div">
<table class="toolbar-table" data-options="id: 'cjzyGpfkcxTable',herf:'kzzx/gridset/query'"></table> <table class="toolbar-table" data-options="id: 'kmesGpfkcxTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 --> <!-- 表格工具栏开始 -->
<div id="cjzyGpfkcxTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'cjzyGpfkcxTable'}"> <div id="kmesGpfkcxTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'kmesGpfkcxTable'}">
<div class="navbar-toolbar"> <div class="navbar-toolbar">
<a class="toolbar-print toolbar" href="javascript:void(0)"></a> <a class="toolbar-print toolbar" href="javascript:void(0)"></a>
<a class="toolbar-export toolbar" href="javascript:void(0)"></a> <a class="toolbar-export toolbar" href="javascript:void(0)"></a>
...@@ -46,38 +46,26 @@ ...@@ -46,38 +46,26 @@
</div> </div>
</div> </div>
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<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="wlid" class="gui-textbox" style="width: 100%"> <input type="text" name="wlid" class="gui-textbox" style="width: 100%">
</div> </div>
</div> </div>
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<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="jzname" class="gui-textbox" style="width: 100%"> <input type="text" name="fkr" class="gui-textbox" style="width: 100%">
</div> </div>
</div> </div>
</li> </li>
<li class="gui-form-row" > <li class="gui-form-row" >
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<label class="gui-form-label">反馈人:</label>
<div class="gui-input-block">
<input type="text" name="fkr" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm3">
<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="wodjid" class="gui-textbox" style="width: 100%"> <input type="text" name="wodjid" class="gui-textbox" style="width: 100%">
</div> </div>
</div> </div>
<div class="gui-col-sm3"> <div class="gui-col-sm4">
<label class="gui-form-label">合格等级:</label>
<div class="gui-input-block">
<input type="text" name="hgdj" class="gui-textbox" style="width: 100%">
</div>
</div>
<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="bxid" class="gui-textbox" style="width: 100%"> <input type="text" name="bxid" class="gui-textbox" style="width: 100%">
...@@ -94,13 +82,12 @@ ...@@ -94,13 +82,12 @@
<script> <script>
$(function () { $(function () {
/*js初始化*/ /*js初始化*/
var $div=$('#cjzyGpfkcx'); var $div=$('#kmesGpfkcx');
var $datBegin=$div.find('input[name="start"]'); var $datBegin=$div.find('input[name="start"]');
var $datEnd=$div.find('input[name="end"]'); var $datEnd=$div.find('input[name="end"]');
var $cbxGzzxid = $div.find('input[name="gzzxid"]'); var $cbxGzzxid = $div.find('input[name="gzzxid"]');
var $cbxBzgxid = $div.find('input[name="bzgxid"]'); var $cbxBzgxid = $div.find('input[name="bzgxid"]');
var $cbxBxid = $div.find('input[name="bxid"]'); var $cbxBxid = $div.find('input[name="bxid"]');
var $cbxHgdj = $div.find('input[name="hgdj"]');
var $datagrid=$div.find(".toolbar-table"); var $datagrid=$div.find(".toolbar-table");
function paramInit(ops){ function paramInit(ops){
...@@ -109,18 +96,17 @@ $(function () { ...@@ -109,18 +96,17 @@ $(function () {
function pageInit() { function pageInit() {
$cbxGzzxid.iCombobox({valueField: "id", textField: "name", allowNull:true,multiple:true, allowEdit:false}); $cbxGzzxid.iCombobox({valueField: "id", textField: "name", allowNull:true,multiple:true, allowEdit:false});
$cbxBxid.iCombobox({valueField: "id", textField: "name", allowNull:true, allowEdit:false}); $cbxBxid.iCombobox({valueField: "id", textField: "name", allowNull:true, allowEdit:false});
$cbxHgdj.iCombobox({valueField: "id", textField: "name", allowNull:true, multiple:true,allowEdit:false});
$datBegin.iDatetimespinner(); $datBegin.iDatetimespinner();
$datEnd.iDatetimespinner(); $datEnd.iDatetimespinner();
$cbxBzgxid.iCombobox({valueField: "id", textField: "name", allowNull:true,multiple:true, allowEdit:false, url: 'kmes/gpfkcx/queryBzgx', $cbxBzgxid.iCombobox({valueField: "id", textField: "name", allowNull:true,multiple:true, allowEdit:false,
url: 'kmes/gpfkcx/queryBzgx',
loadFilter: function (a) { loadFilter: function (a) {
var datas=a["data"]["records"]; var datas=a["data"]["records"];
$.each(datas,function (i,item) { $.each(datas,function (i,item) {
item["name"]=item["gzzxname"]+"-"+item["name"] item["name"]=item["gzzxname"]+"-"+item["name"]
}); });
return datas return datas
}} }});
);
var options = { var options = {
url: 'kmes/gpfkcx', url: 'kmes/gpfkcx',
noRequest: true, noRequest: true,
...@@ -132,20 +118,13 @@ $(function () { ...@@ -132,20 +118,13 @@ $(function () {
{title: "工序名称", field: "bzgxName",width:220}, {title: "工序名称", field: "bzgxName",width:220},
{title: "班型", field: "bxName",width:100}, {title: "班型", field: "bxName",width:100},
{title: "合格", field: "hgbz",width:80,fieldType:"checkbox"}, {title: "合格", field: "hgbz",width:80,fieldType:"checkbox"},
{title: "合格等级", field: "hgdj",width:80},
{title: "反馈数量", field: "fksl", fieldType: "int"}, {title: "反馈数量", field: "fksl", fieldType: "int"},
{title: "合格数量", field: "hgsl", fieldType: "int"}, {title: "合格数量", field: "hgsl", fieldType: "int"},
{title: "不合格数量", field: "bhgsl", fieldType: "int"}, {title: "不合格数量", field: "bhgsl", fieldType: "int"},
{title: "物料编码", field: "wlxxCode", width: 140}, {title: "物料编码", field: "wlxxCode", width: 140},
{title: "机种", field: "jzname", width: 140},
{title: "物料名称", field: "wlxxName", width: 160}, {title: "物料名称", field: "wlxxName", width: 160},
/* {title: "不合格现象", field: "bhgxxName", width: 120},
{title: "不合格原因", field: "bhgyyName", width: 120},*/
{title: "订单号", field: "woDjid", fieldType: "ftString",width:160} {title: "订单号", field: "woDjid", fieldType: "ftString",width:160}
]], ]],
/*onDblClickRow:function(){
$("#cjzyGpfkcxTable-toolbar").find('.toolbar-fkmx').click()
},*/
delimitingRun:run, delimitingRun:run,
dialog: { dialog: {
footerIn: true footerIn: true
...@@ -162,16 +141,12 @@ $(function () { ...@@ -162,16 +141,12 @@ $(function () {
$cbxGzzxid.iCombobox("loadData",res.data.records) $cbxGzzxid.iCombobox("loadData",res.data.records)
}, ops); }, ops);
gas.postHTTP("kmes/bx/query",{},function (res) { gas.postHTTP("cjzy/bx/query",{},function (res) {
$cbxBxid.iCombobox("loadData",res.data.records) $cbxBxid.iCombobox("loadData",res.data.records)
}, ops); }, ops);
gas.postHTTP("kmes/dpgpfk/init/grade",{},function (res) { gas.postHTTP("common/datetime",{},function (res) {
$cbxHgdj.iCombobox("loadData",res.data.records) var date=res.data.data;
}, ops);
gas.postHTTP("common/datetime",{},function (response1) {
var date=response1.data.data;
$datBegin.iDatetimespinner("setValue",new Date(date).Format("yyyy-MM-dd")+' 00:00'); $datBegin.iDatetimespinner("setValue",new Date(date).Format("yyyy-MM-dd")+' 00:00');
$datEnd.iDatetimespinner("setValue",new Date(date).Format("yyyy-MM-dd")+' 23:59'); $datEnd.iDatetimespinner("setValue",new Date(date).Format("yyyy-MM-dd")+' 23:59');
},ops); },ops);
...@@ -184,7 +159,7 @@ $(function () { ...@@ -184,7 +159,7 @@ $(function () {
} }
$("#cjzyGpfkcxTable-toolbar").find('.toolbar-fkmx').iMenubutton({ $("#kmesGpfkcxTable-toolbar").find('.toolbar-fkmx').iMenubutton({
iconCls:"fa fa-reorder", iconCls:"fa fa-reorder",
text:'查看反馈明细', text:'查看反馈明细',
onClick:function(){ onClick:function(){
...@@ -208,7 +183,7 @@ $(function () { ...@@ -208,7 +183,7 @@ $(function () {
} }
}); });
$("#cjzyGpfkcxTable-toolbar").find('.toolbar-fkyy').iMenubutton({ $("#kmesGpfkcxTable-toolbar").find('.toolbar-fkyy').iMenubutton({
iconCls:"fa fa-reorder", iconCls:"fa fa-reorder",
text:'不合格现象及原因', text:'不合格现象及原因',
onClick:function(){ onClick:function(){
......
...@@ -12,10 +12,9 @@ ...@@ -12,10 +12,9 @@
</div> </div>
<div class="gui-row" > <div class="gui-row" >
<div class="gui-col-sm12"> <div class="gui-col-sm12">
<label class="gui-form-label" for="">物料编码:</label> <label class="gui-form-label">物料编码:</label>
<div class="gui-input-block"> <div class="gui-input-block">
<input type="text" name="wlid" data-options="required:true" data-toggle="gui-searchbox" data-title="wlname" style="width: 100%"> <input type="text" name="wlid" data-options="required:true" data-toggle="gui-searchbox" data-title="wlname" style="width: 100%">
<input type="hidden" name="wlname">
</div> </div>
</div> </div>
</div> </div>
......
<div id="hzgdWosngz" class="gui-div"> <div id="kwellWosngz" class="gui-div">
<table class="toolbar-table" data-options="id: 'wosngzTable',herf:'kzzx/gridset/query'"></table> <table class="toolbar-table" data-options="id: 'wosngzTable',herf:'kzzx/gridset/query'"></table>
<!-- 表格工具栏开始 --> <!-- 表格工具栏开始 -->
<div id="wosngzTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'wosngzTable'}"> <div id="wosngzTable-toolbar" class="gui-toolbar" data-options="grid:{type:'datagrid',id:'wosngzTable'}">
...@@ -30,26 +30,6 @@ ...@@ -30,26 +30,6 @@
</div> </div>
</div> </div>
</li> </li>
<li class="gui-form-row" >
<div class="gui-col-sm4">
<label class="gui-form-label">操作人:</label>
<div class="gui-input-block">
<input type="text" name="fkr" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">物料:</label>
<div class="gui-input-block">
<input type="text" name="wlid" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">机种:</label>
<div class="gui-input-block">
<input type="text" name="jzname" class="gui-textbox" style="width: 100%">
</div>
</div>
</li>
<li class="gui-form-row" > <li class="gui-form-row" >
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<div class="gui-col-sm6"> <div class="gui-col-sm6">
...@@ -64,13 +44,26 @@ ...@@ -64,13 +44,26 @@
</div> </div>
</div> </div>
</div> </div>
<div class="gui-col-sm4">
<label class="gui-form-label">操作人:</label>
<div class="gui-input-block">
<input type="text" name="fkr" class="gui-textbox" style="width: 100%">
</div>
</div>
<div class="gui-col-sm4">
<label class="gui-form-label">物料信息:</label>
<div class="gui-input-block">
<input type="text" name="wlid" class="gui-textbox" style="width: 100%">
</div>
</div>
</li>
<li class="gui-form-row" >
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<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="djid" class="gui-textbox" style="width: 100%"> <input type="text" name="djid" class="gui-textbox" style="width: 100%">
</div> </div>
</div> </div>
<div class="gui-col-sm4"> <div class="gui-col-sm4">
<label class="gui-form-label">班型:</label> <label class="gui-form-label">班型:</label>
<div class="gui-input-block"> <div class="gui-input-block">
...@@ -88,7 +81,7 @@ ...@@ -88,7 +81,7 @@
<script> <script>
$(function () { $(function () {
/*js初始化*/ /*js初始化*/
var $div=$('#hzgdWosngz'); var $div=$('#kwellWosngz');
var $cbxBxid = $div.find('input[name="bxid"]'); var $cbxBxid = $div.find('input[name="bxid"]');
var $cbxGzzxid = $div.find('input[name="gzzxid"]'); var $cbxGzzxid = $div.find('input[name="gzzxid"]');
var $cbxGxname = $div.find('input[name="bzgxname"]'); var $cbxGxname = $div.find('input[name="bzgxname"]');
...@@ -123,9 +116,7 @@ ...@@ -123,9 +116,7 @@
{title: "当前作业时间", field: "czsj", fieldType: "ftDateTime"}, {title: "当前作业时间", field: "czsj", fieldType: "ftDateTime"},
{title: "班型", field: "bxName",width:100}, {title: "班型", field: "bxName",width:100},
{title: "物料编码", field: "wlxxCode", width: 140}, {title: "物料编码", field: "wlxxCode", width: 140},
{title: "机种", field: "jzname", width: 140},
{title: "物料名称", field: "wlxxName", width: 200}, {title: "物料名称", field: "wlxxName", width: 200},
{title: "合格等级", field: "wosnhgdj", width: 140},
{title: "订单号", field: "djid", fieldType: "ftString",width:130}, {title: "订单号", field: "djid", fieldType: "ftString",width:130},
{title: "订单日期", field: "ywrq", fieldType: "ftDate"} {title: "订单日期", field: "ywrq", fieldType: "ftDate"}
]], ]],
...@@ -162,7 +153,7 @@ ...@@ -162,7 +153,7 @@
} }
} }
}), })
}) })
} }
/*数据初始化*/ /*数据初始化*/
...@@ -171,11 +162,11 @@ ...@@ -171,11 +162,11 @@
$cbxGzzxid.iCombobox("loadData",res.data.records) $cbxGzzxid.iCombobox("loadData",res.data.records)
}, ops); }, ops);
gas.postHTTP("kmes/bx/query",{},function (res) { gas.postHTTP("cjzy/bx/query",{},function (res) {
$cbxBxid.iCombobox("loadData",res.data.records) $cbxBxid.iCombobox("loadData",res.data.records)
}, ops); }, ops);
gas.postHTTP("kmes/gpfkhz/init/gxname",{},function (res) { gas.postHTTP("kmes/init/gxname",{},function (res) {
$cbxGxname.iCombobox("loadData",res.data.records) $cbxGxname.iCombobox("loadData",res.data.records)
}, ops); }, ops);
...@@ -198,7 +189,7 @@ ...@@ -198,7 +189,7 @@
iconCls:"fa fa-reorder", iconCls:"fa fa-reorder",
text:'流程信息', text:'流程信息',
onClick:function(){ onClick:function(){
var row=$('#hzgdWosngz').find(".toolbar-table").datagrid("getSelected"); var row=$('#kwellWosngz').find(".toolbar-table").datagrid("getSelected");
if(!row){ if(!row){
gas.showTipsWarning("请选择一条数据"); gas.showTipsWarning("请选择一条数据");
return false return false
...@@ -214,7 +205,7 @@ ...@@ -214,7 +205,7 @@
maximized:true, maximized:true,
footerIn:true, footerIn:true,
onBeforeLoad:function () { onBeforeLoad:function () {
$(this).dialog("options").queryParams={wosnid:$('#hzgdWosngz').find(".toolbar-table").datagrid("getSelected").wosnCode} $(this).dialog("options").queryParams={wosnid:$('#kwellWosngz').find(".toolbar-table").datagrid("getSelected").wosnCode}
} }
}) })
}, },
......
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