Commit 60db7963 authored by yff's avatar yff

修改BUG,新增改制反馈模块

parent c30b95e5
......@@ -48,13 +48,8 @@ public class GpfkController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "kmes/gpfk/index";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
......
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.common.utils.StringUtils;
import com.gavel.common.utils.ThreadContext;
import com.gavel.kwell.service.GpfkService;
import com.gavel.kwell.vo.GpfkCondition;
import com.gavel.kwell.vo.GpfkVO;
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/gzfk")
public class GpgzController extends BaseController {
@Autowired
private GpfkService gpfkService;
@ResourcePermissions()
@RequestMapping("/index")
public String index() {
return "kmes/gzfk/index";
}
@ResourcePermissions()
@RequestMapping("/zpindex")
public String jyindex() {
return "kmes/gzfk/zpindex";
}
@ResourcePermissions({SystemOperation.BottonResource.ADD})
@RequestMapping("/add")
public String add() {
return "kmes/gzfk/edit";
}
@ResourcePermissions({SystemOperation.BottonResource.EDIT})
@RequestMapping("/edit")
public String edit() {
return "kmes/gzfk/edit";
}
@RequestMapping("/gx")
public String gx() {
return "kmes/gzfk/gx";
}
@RequestMapping(value = BaseURL.QUERY, method = RequestMethod.POST)
@ResponseBody
public Object query(@RequestBody GpfkCondition condition) {
RecordSet<GpfkVO> records = gpfkService.query(condition);
return buildReturnData(records, GpfkVO.class);
}
@ResourcePermissions({"21"})
@RequestMapping(value = "/delGzfk", method = RequestMethod.POST)
@ResponseBody
public Object delJgfk(@RequestBody JSONObject param) {
String gpfkid = param.getString("gpfkid");
if(StringUtils.isEmpty(gpfkid)){
setReturnMessage("请选择一条工票信息进行操作!");
return returnData();
}
gpfkService.delGpfkById(gpfkid);
return ThreadContext.getReturnData();
}
@ResourcePermissions(SystemOperation.BottonResource.EXPORT)
@RequestMapping(value = BaseURL.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<GpfkVO> records = gpfkService.query(condition);
doExport(request, response, param, records.getRecords());
}
}
......@@ -177,6 +177,8 @@ public interface GpfkDao extends BaseDao {
public List<Wogylx> getNextGxContainSelf(Wogylx wogylx) ;
/**查询日计数 合格数量 不合格数量**/
public GpfkVO queryDailyFkInfoUpgrade(GpfkCondition condition);
/**查询日计数 合格数量 不合格数量**/
public double queryWobomGjwlsl(String wosnid,String bzgx);
/** ------------END工票反馈升级-----------------***/
......
......@@ -1868,5 +1868,29 @@ public class GpfkDaoImpl extends BaseDaoImpl implements GpfkDao {
}
@Override
public double queryWobomGjwlsl(String wosnid,String bzgx) {
SqlMap sqlMap = new SqlMap();
sqlMap.append("select count(WOBOM_ID)");
sqlMap.append("from WOBOM");
sqlMap.append(" left join WLXX on WLXX_ID = WOBOM_WLID");
sqlMap.append(" left join WO on WO_ID = WOBOM_WOID");
sqlMap.append(" left join WOSN on WOSN_WOID = WO_ID");
sqlMap.append(" left join WOGYLX on WOGYLX_ID = WOBOM_FFGX ");
sqlMap.append(" left join BZGX on BZGX_ID = WOGYLX_BZGXID ");
sqlMap.append("where 1=1 and WOBOM_GJWL='Y' ");
if (StringUtils.isNotEmpty(bzgx)){
sqlMap.append(" and " + SqlUtil.getWhereSql("BZGX_ID", bzgx));
sqlMap.setParamValue("BZGX_ID", bzgx);
}
if (StringUtils.isNotEmpty(wosnid)){
sqlMap.append(" and " + SqlUtil.getWhereSql("WOSN_CODE", wosnid));
sqlMap.setParamValue("WOSN_CODE", wosnid);
}
System.out.println(sqlMap.getSqlText());
return sqlMap.queryDouble();
}
}
......@@ -1714,6 +1714,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
return curFkVo;
}
else if(snType.equals(SmCodeEnum.WLID.getId())) {
if(gpfkDao.queryWobomGjwlsl(fkCondition.getWosncode(), fkCondition.getBzgxid())<=0) {
throwReturnMessage("该订单下不存在该发放工序关键物料,请重新确认!");
}
String wlid = coderuleService.matchCodeByRule(fkCondition.getSncode());
fkCondition.setWlid(wlid);
if(gpfkDao.checkIfContainsWobomWl(fkCondition)<=0) {
......
......@@ -8,7 +8,11 @@
<menu mkid="901000000" mkmc = "科威尔MES">
<menu mkid="901001600" mkmc="加工反馈" url="kmes/jgfk/zpindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消装配" value="Y"/>
<mkcz czid = "21" czmc = "取消加工" value="Y"/>
</menu>
<menu mkid="901001800" mkmc="改制反馈" url="kmes/gzfk/zpindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
<mkcz czid = "21" czmc = "取消改制" value="Y"/>
</menu>
<menu mkid="901000200" mkmc="装配反馈" url="kmes/gphy/zpindex">
<print entity="com.gavel.kwell.vo.GpfkVO"/>
......@@ -48,6 +52,8 @@
</menu>
<menu mkid="1901000800" mkmc="加工反馈" url="kmes/jgfk/index" gnlx="M">
</menu>
<menu mkid="1901001000" mkmc="改制反馈" url="kmes/gzfk/index" gnlx="M">
</menu>
</menu>
<menu fmkid="510020000" mkid="510020300" mkmc="排产计划维护" url="kmes/pcjhk/index">
<print entity="com.gavel.kwell.vo.PcjhkVO" type="M"/>
......
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