JLR1.0
This commit is contained in:
@ -34,7 +34,7 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
pageInfo.setRows(UtilTools.getRows(request));
|
||||
//sql动态拼接
|
||||
StringBuffer sql=null;
|
||||
//如果state为0则证明此操作为管理员,否则是经销商
|
||||
//如果state为0则证明此操作为JLR总账号,否则是经销商
|
||||
if("0".equals(state)){
|
||||
if("1".equals(rescueState)){
|
||||
sql = new StringBuffer("select DISTINCT u.code orderCode,u.create_time create_time," +
|
||||
@ -91,9 +91,8 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join base_service b on b.id=u.service_id " +
|
||||
"left join jlr_supplier_visual v on v.supplier_id=s.id " +
|
||||
"where u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+") " +
|
||||
"and u.order_status not in (51,53,55)");
|
||||
// "and u.order_status = 31 " +
|
||||
// "and v.jlr_user_id =" + logininfo.getId());
|
||||
"and u.order_status = 31 " +
|
||||
"and v.jlr_user_id =" + logininfo.getId());
|
||||
}else if("2".equals(rescueState)){
|
||||
sql = new StringBuffer("select DISTINCT u.code orderCode,u.create_time create_time," +
|
||||
"u.vin_no vin_no,s.name name," +
|
||||
@ -102,9 +101,9 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join supplier s on t.service_supplier_id=s.id " +
|
||||
"left join base_service b on b.id=u.service_id " +
|
||||
"left join jlr_supplier_visual v on v.supplier_id=s.id " +
|
||||
"where u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+") ");
|
||||
// "and u.order_status = 55 " +
|
||||
// "and v.jlr_user_id =" + logininfo.getId());
|
||||
"where u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+") "+
|
||||
"and u.order_status = 55 " +
|
||||
"and v.jlr_user_id =" + logininfo.getId());
|
||||
}else if("3".equals(rescueState)){
|
||||
sql = new StringBuffer("select DISTINCT u.code orderCode,u.create_time create_time," +
|
||||
"u.vin_no vin_no,s.name name," +
|
||||
@ -113,9 +112,9 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join supplier s on t.service_supplier_id=s.id " +
|
||||
"left join base_service b on b.id=u.service_id " +
|
||||
"left join jlr_supplier_visual v on v.supplier_id=s.id " +
|
||||
"where u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+") ");
|
||||
// "and u.order_status = 51 " +
|
||||
// "and v.jlr_user_id =" + logininfo.getId());
|
||||
"where u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+") "+
|
||||
"and u.order_status = 51 " +
|
||||
"and v.jlr_user_id =" + logininfo.getId());
|
||||
}else {
|
||||
sql = new StringBuffer("select DISTINCT u.code orderCode,u.create_time " +
|
||||
"create_time,u.vin_no vin_no,s.name name, " +
|
||||
@ -132,9 +131,9 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join base_service b on b.id=u.service_id " +
|
||||
"left join jlr_supplier_visual v on v.supplier_id=s.id " +
|
||||
"where " +
|
||||
"u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id =" + logininfo.getId() + ")") ;
|
||||
// "and u.order_status in (31,53,51,55) " +
|
||||
// "and v.jlr_user_id =" + logininfo.getId());
|
||||
"u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id =" + logininfo.getId() + ")"+
|
||||
"and u.order_status in (31,53,51,55) " +
|
||||
"and v.jlr_user_id =" + logininfo.getId());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(frame_code)) {
|
||||
@ -205,7 +204,7 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join base_service b on b.id=u.service_id "+
|
||||
"left join jlr_epqr w on w.task_order_id = u.tid " +
|
||||
"where b.id in (1041,1050,1500,1501,1520,1521) " +
|
||||
"and u.order_status in (21,23,25,28,31) " +
|
||||
// "and u.order_status in (21,23,25,28,31) " +
|
||||
"and w.state = 1 " +
|
||||
"and u.contract_id in (select contract_id from jlr_contract_visual where jlr_user_id ="+logininfo.getId()+")");
|
||||
}else{
|
||||
@ -224,7 +223,7 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join jlr_epqr w on w.task_order_id = u.tid " +
|
||||
"left join base_service b on b.id=u.service_id "+
|
||||
"where b.id in (1041,1050,1500,1501,1520,1521) " +
|
||||
"and u.order_status in (21,23,25,28,31) " +
|
||||
// "and u.order_status in (21,23,25,28,31) " +
|
||||
"and u.destination_code in (select contract_destination_id from jlr_destination_visual where jlr_user_id ="+logininfo.getId()+")");
|
||||
}
|
||||
if (StringUtils.isNotBlank(frame_code)) {
|
||||
@ -292,22 +291,22 @@ public class CaseDaoImpl extends BaseDaoHibernate implements CaseDao {
|
||||
"left join supplier s on u.service_supplier_id = s.id "+
|
||||
"left join base_service b on b.id = u.service_id " +
|
||||
"left join contract_member_service_group m on u.member_service_group_id=m.id " +
|
||||
"left join contract_trouble_level j on j.id = u.malfunction_level1 " +
|
||||
"left join contract_trouble_level j on j.id = u.malfunction_level1 " +
|
||||
"left join contract_destination d on d.id = u.contract_destination_id " +
|
||||
"left join jlr_epqr e on e.task_order_id = u.tid " +
|
||||
"where u.id = '" + caseCode+"'");
|
||||
if (StringUtils.isNotBlank(tid)) {
|
||||
sql.append(" and u.tid = '" + tid +"'");
|
||||
}
|
||||
try {
|
||||
//获取案件详情信息
|
||||
List list = getRsBySql(sql.toString());
|
||||
if (StringUtils.isNotBlank(tid)) {
|
||||
sql.append(" and u.tid = '" + tid +"'");
|
||||
}
|
||||
try {
|
||||
//获取案件详情信息
|
||||
List list = getRsBySql(sql.toString());
|
||||
if (list != null && list.size() > 0) {
|
||||
vo.setRows(UtilTools.listTojsonArray(list, new String[]{"UID","TID","ORDER_CODE", "CREATE_TIME", "VIN_NO", "NAME", "CODE", "SERVICE_NAME", "MODEL", "PLATENUMBER", "STARTTIME", "LEVELNAME1", "FINISHTIME", "LEVELNAME2", "DNAME", "BRANDNAME", "DMS", "REASON", "MILEAGE", "DNUMBER", "ARRIVETIME", "REMARK", "CHOICE", "PART", "REPAIR", "REFTIME", "FINTIME", "HANDTIME", "USETIME","STATE"}));
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
Reference in New Issue
Block a user