76 lines
1.8 KiB
Java
76 lines
1.8 KiB
Java
package com.tenwa.customer.controller.group;
|
|
|
|
import jbo.app.tenwa.customer.CUSTOMER_GROUP_RELATION;
|
|
|
|
import com.amarsoft.are.jbo.BizObjectManager;
|
|
import com.amarsoft.are.jbo.BizObjectQuery;
|
|
import com.amarsoft.are.jbo.JBOFactory;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
|
|
public class CustomerGroupRelationController {
|
|
private String certtype;
|
|
private String certid;
|
|
private String orgID;
|
|
private String id="";
|
|
private String customerid="";
|
|
|
|
public String getCerttype() {
|
|
return certtype;
|
|
}
|
|
public void setCerttype(String certtype) {
|
|
this.certtype = certtype;
|
|
}
|
|
public String getCertid() {
|
|
return certid;
|
|
}
|
|
public void setCertid(String certid) {
|
|
this.certid = certid;
|
|
}
|
|
public String getOrgID() {
|
|
return orgID;
|
|
}
|
|
public void setOrgID(String orgID) {
|
|
this.orgID = orgID;
|
|
}
|
|
public String getCustomerid() {
|
|
return customerid;
|
|
}
|
|
|
|
public void setCustomerid(String customerid) {
|
|
this.customerid = customerid;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String initStatusYes(JBOTransaction tx)throws Exception {
|
|
BizObjectManager bm = JBOFactory.getBizObjectManager(CUSTOMER_GROUP_RELATION.CLASS_NAME);
|
|
tx.join(bm);
|
|
BizObjectQuery bq = bm.createQuery("update O set status = 'status02' where id=:id ");
|
|
bq.setParameter("id",id);
|
|
int i = bq.executeUpdate();
|
|
String s = Integer.toString(i);
|
|
return s;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param tx
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
public String initStatusNo(JBOTransaction tx)throws Exception {
|
|
BizObjectManager bm = JBOFactory.getBizObjectManager(CUSTOMER_GROUP_RELATION.CLASS_NAME);
|
|
tx.join(bm);
|
|
BizObjectQuery bq = bm.createQuery("update O set status = 'status03' where id=:id ");
|
|
bq.setParameter("id",id);
|
|
int i = bq.executeUpdate();
|
|
String s = Integer.toString(i);
|
|
return s;
|
|
}
|
|
} |