src/com/niuys/gdzc/web/struts/action/AddPerAssetAction.java

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.niuys.gdzc.web.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.niuys.gdzc.model.ZcInfo;
import com.niuys.gdzc.model.ZcWx;
import com.niuys.gdzc.web.struts.form.AddPerAssetForm;

public class AddPerAssetAction extends BaseAction {

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		HttpSession session=(HttpSession)request.getSession();
		String error="没有插入到后台数据库中!";
		AddPerAssetForm aaf = (AddPerAssetForm) form;

		ZcWx zcwx = new ZcWx();
		ZcInfo zcinfo=new ZcInfo();
		zcwx.setSendTime(aaf.getSend_time());
		String zcid=aaf.getZc_id();
		zcinfo.setZcId(zcid);
		zcwx.setZcInfo(zcinfo);
		String sender=aaf.getSender();
		zcwx.setSender(sender);
		zcwx.setLoginUser(aaf.getLogin_user());
		zcwx.setReason(aaf.getReason());
		String str="正常";
		
		//判断送修负责人是否存在
		if( employeeManagerImpl.isEmployeebyname(sender)){
			request.setAttribute("erroremp", "*该员工不存在");
			return mapping.findForward("fail");
			
		}
		//判断维修资产的状态
		if( !str.equals(inOutAssetManagerImpl.zcStatus(zcid))){
			request.setAttribute("errorzcid", "*此编号资产已借出或未维修完成");
			return mapping.findForward("fail");

		}
	
			if(assetPerManagerImpl.insertPerAssets(zcwx)){
			
				return mapping.findForward("success");
			}
			else
			{
				request.setAttribute("error",error);
				return mapping.findForward("fail");
			}
		} 

后面还有 1 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。