You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.7 KiB
Java

6 months ago
package com.weaver.seconddev.njwebservice;
import com.weaver.common.i18n.tool.util.I18nContextUtil;
import com.weaver.seconddev.njwebservice.entity.EasSpzfResponseInfo;
import com.weaver.seconddev.njwebservice.entity.EasTzlhtSpzfRes;
import com.weaver.seconddev.njwebservice.entity.EasTzlhtSpzfResData;
import com.weaver.seconddev.njwebservice.util.SecondUtil;
import com.weaver.verupgrade.conn.CONN_TYPE;
import com.weaver.verupgrade.conn.RecordSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
* @Author liang.cheng
* @Date 2025/1/20 17:37
* @Description:
* @Version 1.0
*/
@Service("easTzlhtSpzfApplicationWebService")
public class EasTzlhtSpzfApplicationService {
private final static Logger log = LoggerFactory.getLogger(EasTzlhtSpzfApplicationService.class);
public EasSpzfResponseInfo easTzlhtSpzfApplicate(EasTzlhtSpzfRes param) {
log.error("EasTzlhtSpzfApplicationImpl-----start"+param.toString());
RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
String poolname = CONN_TYPE.workflow.getType();
EasSpzfResponseInfo res = new EasSpzfResponseInfo();
// if(param.getDATAS()!=null&&param.getDATAS().length>0) {
EasTzlhtSpzfResData data = param.getDatas();
String loginName = data.getLoginname();
String password = data.getPassword();
String workflowId = data.getWorkflowId();
String requestId = data.getRequestId();
String optType = data.getOptType();
if (!"EAS".equals(loginName) && !"123456".equals(password)) {
res.setIsTat("F");
res.setMessage("接口用户名/密码不对!");
return res;
}
if (workflowId == null || workflowId.equals("")) {
res.setIsTat("F");
res.setMessage("流程id为空");
return res;
}
if (requestId == null || requestId.equals("")) {
res.setIsTat("F");
res.setMessage("请求id为空");
return res;
}
String tablename = SecondUtil.getTableName(workflowId);
log.error("tablename:"+tablename);
String isYX = "0";
if ("N".equals(optType)) {//流程作废
isYX = "1";
}
String sql = "update " + tablename + " set sfyx ='" + isYX + "' where requestId = " + requestId;
rs.executeSql(sql,poolname);
res.setIsTat("S");
res.setMessage("接口调用成功!");
return res;
// }else{
// res.setISTAT("F");
// res.setMESSAGE("请传入请求参数!");
// return res;
// }
}
}