FROM ACC_GROUP_T@ACCU_DBLINK LEFT join ACC_GROUP_RELATION_T@ACCU_DBLINK on ACC_GROUP_T.GROUP_NO = ACC_GROUP_RELATION_T.GROUP_NO
left join CITYINFO on CITYINFO.CITYCODE = substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6)
left join MAKETYPE_DIC on MAKETYPE_DIC.TYPENUM = decode(substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,0,6),'419900',6,substr(ACC_GROUP_RELATION_T.ORIGINAL_NO,21,1))
where ACC_GROUP_RELATION_T.DEAL_DATE =#(dealDate)
and ACC_GROUP_T.group_no not in (select groupinfo.groupno from groupinfo)
select PRODUCTION_TASK_LIST_ID,MAKE_TYPE,OLD_MAKE_TYPE,CITYCODE,WORKSHOP,SUBMIT_DATE,HANDOUT_DATE,IS_PRINT,DOWNLOAD_DATE,PRINT_OUT,PERMANENT_POSITION_DATE,ROLL_OUT_WORKSHOP_DATE,QUALITYINSPECTION_NAME,QUALITYINSPECTION_DATE,EXCEPTION_INFORMATION,OUTBOUND_DATE,PUTINSTORAGE_DATE from PRODUCTION_TASK_LIST where PRODUCTION_TASK_LIST_ID like #{id}
Insert into PRODUCTION_TASK_LIST (PRODUCTION_TASK_LIST_ID,MAKE_TYPE,OLD_MAKE_TYPE,CITYCODE,WORKSHOP,SUBMIT_DATE,HANDOUT_DATE,IS_PRINT,DOWNLOAD_DATE,PRINT_OUT,PERMANENT_POSITION_DATE,ROLL_OUT_WORKSHOP_DATE,QUALITYINSPECTION_NAME,QUALITYINSPECTION_DATE,EXCEPTION_INFORMATION,OUTBOUND_DATE,PUTINSTORAGE_DATE)
select PRODUCTION_TASK_LIST_ID,MAKE_TYPE,OLD_MAKE_TYPE,CITYCODE,WORKSHOP,SUBMIT_DATE,HANDOUT_DATE,IS_PRINT,DOWNLOAD_DATE,PRINT_OUT,PERMANENT_POSITION_DATE,ROLL_OUT_WORKSHOP_DATE,QUALITYINSPECTION_NAME,QUALITYINSPECTION_DATE,EXCEPTION_INFORMATION,OUTBOUND_DATE,PUTINSTORAGE_DATE from PRODUCTION_TASK_LIST left join GROUPINFO on GROUPINFO.CYCLESHEETID = PRODUCTION_TASK_LIST.PRODUCTION_TASK_LIST_ID where GROUPINFO.GROUPNO =#{acceptNo} or GROUPINFO.GROUPNO =substr (#{acceptNo},0,8)
<!--<!–select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,–>-->
<!--select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,-->
<!--<!–sys_permission.id as pid,sys_permission.name as pname,sys_permission.url–>-->
<!--sys_permission.id as pid,sys_permission.name as pname,sys_permission.url-->
<!--<!–from user_info–>-->
<!--from user_info-->
<!--<!–left join sys_user_role on user_info.uid = sys_user_role.uid–>-->
<!--left join sys_user_role on user_info.uid = sys_user_role.uid-->
<!--<!–left join sys_role on sys_user_role.role_id= sys_role.id–>-->
<!--left join sys_role on sys_user_role.role_id= sys_role.id-->
<!--<!–left join sys_role_permission on sys_role.id = sys_role_permission.permission_id–>-->
<!--left join sys_role_permission on sys_role.id = sys_role_permission.permission_id-->
<!--<!–left join sys_permission on sys_role_permission.permission_id = sys_permission.id–>-->
<!--left join sys_permission on sys_role_permission.permission_id = sys_permission.id-->
<!--<!–select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,–>-->
<!--select user_info.uid,user_info.username,user_info.password,user_info.name,sys_role.id as rid,sys_role.role,sys_role.description,-->
<!--<!–sys_permission.id as pid,sys_permission.name as pname,sys_permission.url–>-->
<!--sys_permission.id as pid,sys_permission.name as pname,sys_permission.url-->
<!--<!–from user_info–>-->
<!--from user_info-->
<!--<!–left join sys_user_role on user_info.uid = sys_user_role.uid–>-->
<!--left join sys_user_role on user_info.uid = sys_user_role.uid-->
<!--<!–left join sys_role on sys_user_role.role_id= sys_role.id–>-->
<!--left join sys_role on sys_user_role.role_id= sys_role.id-->
<!--<!–left join sys_role_permission on sys_role.id = sys_role_permission.permission_id–>-->
<!--left join sys_role_permission on sys_role.id = sys_role_permission.permission_id-->
<!--<!–left join sys_permission on sys_role_permission.permission_id = sys_permission.id–>-->
<!--left join sys_permission on sys_role_permission.permission_id = sys_permission.id-->