

#陕西print_design 要调整

UPDATE `print_design` set `content`='var printState = 0,LODOP = perCerPrintUtil.getLodop();\r\n        LODOP.PRINT_INITA(\"0mm\", 0, \"210mm\", \"297mm\", \"陕西保安员证书打印\");\r\n        LODOP.SET_PRINT_MODE(\"BKIMG_IN_PREVIEW\", 1);\r\n        LODOP.ADD_PRINT_SETUP_BKIMG(\"<img border=\'0\' src=\'\" + restHost +  securityPic + \"\'+>\");\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_LEFT\", 0);\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_TOP\", 0);\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_WIDTH\", \"210mm\");\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_HEIGHT\", \"297mm\");\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_IN_PREVIEW\", true);\r\n        LODOP.SET_SHOW_MODE(\"BKIMG_PRINT\", true);\r\n        for (i = 0; i < detail.length; i += 2) {\r\n            if(detail[i] != null && typeof(detail[i] != \'undefined\')) {\r\n                LODOP.NewPage();\r\n                LODOP.ADD_PRINT_TEXT(260 + 36, 517, 133, 20, detail[i].xm);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.ADD_PRINT_TEXT(370, 518, 171, 56, detail[i].address == null ? \'\' : detail[i].address.substring(0, 9) + \"\\r\\n\" + detail[i].address.substring(9, detail[i].address.length));\r\n                LODOP.SET_PRINT_STYLEA(2,\"ReadOnly\",0);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LineSpacing\", 3);\r\n                LODOP.ADD_PRINT_TEXT(334, 517, 163, 20, changeBirthFormat(getBirthdayFromIDNo(detail[i].idnum)));\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(462, 541, 239, 20, detail[i].idnum);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(360, 223, 200, 20, (detail[i].fzrq == null ? \"\" : changeBirthFormat(detail[i].fzrq.substring(0, 10))));\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(462, 207, 186, 20, detail[i].zsbh);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 16);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -2);\r\n                LODOP.ADD_PRINT_TEXT(145, 168, 111, 20, detail[i].xm);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 16);\r\n                //照片\r\n                if(detail[i].photo != null && detail[i].photo !=\"\") {\r\n                    LODOP.ADD_PRINT_IMAGE(138, 488, \"26.00mm\", \"32.00mm\", detail[i].photo);//+1\r\n                }\r\n\r\n                LODOP.SET_PRINT_STYLEA(0, \"Stretch\", 2);\r\n                //二维码50\r\n                LODOP.ADD_PRINT_IMAGE(182, 282, 99, 99,detail[i].qrcode);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Stretch\", 2);\r\n            }\r\n            if (detail[i + 1] != null && typeof(detail[i + 1] != \'undefined\')) {\r\n                LODOP.ADD_PRINT_TEXT(778, 517, 133, 20, detail[i + 1].xm);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.ADD_PRINT_TEXT(816, 518, 163, 20, changeBirthFormat(getBirthdayFromIDNo(detail[i + 1].idnum)));\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(852, 518, 171, 56, detail[i + 1].address == null ? \'\' : detail[i + 1].address.substring(0, 9) + \"\\r\\n\" + detail[i + 1].address.substring(9, detail[i + 1].address.length));\r\n                LODOP.SET_PRINT_STYLEA(12,\"ReadOnly\",0);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LineSpacing\", 3);\r\n                LODOP.ADD_PRINT_TEXT(945, 541, 239, 20, detail[i + 1].idnum);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(627, 168, 111, 20, detail[i + 1].xm);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 16);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.ADD_PRINT_TEXT(842, 223, 200, 20, (detail[i + 1].fzrq == null ? \"\" : changeBirthFormat(detail[i + 1].fzrq.substring(0, 10))));\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 12);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -1);\r\n                LODOP.ADD_PRINT_TEXT(945, 204, 186, 20, detail[i + 1].zsbh);\r\n                LODOP.SET_PRINT_STYLEA(0, \"FontSize\", 16);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Bold\", 1);\r\n                LODOP.SET_PRINT_STYLEA(0, \"LetterSpacing\", -2);\r\n                //照片\r\n                if(detail[i+1].photo != null && detail[i+1].photo !=\"\") {\r\n                    LODOP.ADD_PRINT_IMAGE(617, 488, \"26.00mm\", \"32.00mm\",detail[i + 1].photo);\r\n                }\r\n                LODOP.SET_PRINT_STYLEA(0, \"Stretch\", 2);//二维码\r\n                //二维码50\r\n                LODOP.ADD_PRINT_IMAGE(666, 282, 99, 99,detail[i + 1].qrcode);\r\n                LODOP.SET_PRINT_STYLEA(0, \"Stretch\", 2);\r\n            }\r\n        }\r\n\r\n        //直接打印返回逻辑真假结果（1或true代表真，false或0代表假），表示是否成功（关于进一步捕获打印状态参考样例45）；\r\n        //打印维护和打印预览返回打印次数，大于0表示打印成功的次数；\r\n        //谷歌浏览器\r\n        if (LODOP.CVERSION) {\r\n            CLODOP.On_Return = function (TaskID, Value) {\r\n                //打印状态\r\n                printState = Value;\r\n                if(printState >= 1){\r\n                    var snapshotIdArr=[];\r\n                    var idArr=[];\r\n                    for (i = 0; i < detail.length; i++) {\r\n                        idArr.push(detail[i].securitypersonid);\r\n                        snapshotIdArr.push(detail[i].snapshotId);\r\n                    }\r\n                    perCerPrintUtil.updatePrinted(idArr,snapshotIdArr);\r\n                    $(\'#dataTable\').datagrid(\'clearChecked\');\r\n                    //查询刷新\r\n                    setTimeout(\"refresh();\",1000);\r\n                    setTimeout(\"layer.closeAll();\",1500);\r\n                }\r\n            };\r\n        }\r\n        printState = LODOP.PRINT_SETUP();\r\n\r\n\r\n\r\n				//非谷歌\r\n        if (!LODOP.CVERSION) {\r\n					if(printState >= 1){\r\n            var snapshotIdArr=[];\r\n                    var idArr=[];\r\n                    for (i = 0; i < detail.length; i++) {\r\n                        idArr.push(detail[i].securitypersonid);\r\n                        snapshotIdArr.push(detail[i].snapshotId);\r\n                    }\r\n                    perCerPrintUtil.updatePrinted(idArr,snapshotIdArr);\r\n                    $(\'#dataTable\').datagrid(\'clearChecked\');\r\n                    //查询刷新\r\n                    setTimeout(\"refresh();\",1000);\r\n                    setTimeout(\"layer.closeAll();\",1500);\r\n					}\r\n        }'
WHERE `type`='BAYZGZ' and `areacode`='610000';


#20201223
update module_menu t1,config t2
set t1.active=FALSE
where parentIds like '%786192747567583232%'
and t2.`key`='current_native'
and t2.`value` not in ('11');



#20201229
update train_certificate t1,security_company t2
set t1.areaCode = t2.areacode,t1.orgId=t2.orgid
where t1.companyId = t2.id and t1.areaCode is null;

update train_certificate t1,sb_traincompanyapply t2
set t1.areaCode = t2.district,t1.orgId=t2.orgid
where t1.traincompanyapplyid = t2.id and t1.areaCode is null;


UPDATE train_certificate t1,config t2 SET t1.areaCode = concat(t2.`value`,'0000')
where t1.areaCode is null and t2.`key`='current_native';

#20201229
update module_menu t1,config t2
set t1.location='trainCertificate/list/index.do'
where t1.id=732605543444643840
and t2.`key`='current_native'
and t2.`value` in ('61');