// 判断签字是否存在
// 打印签字信息
@SuppressWarnings("restriction")
	private void updateDJTSign(ChildVaccinaterecord childVaccinaterecord, Map<String, Object> maplist,
			Map<String, Object> code) {
		logger.info("获取排号签字数据开始" + childVaccinaterecord.getNid().substring(0, 2) + "||"
				+ childVaccinaterecord.getVaccineid());
		Object signObjVaccid = CacheUtils.get(CacheUtils.SIGN_CACHE,
				childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
		logger.info("signObjVaccid-->" + (signObjVaccid == null));
		CacheUtils.remove(CacheUtils.SIGN_CACHE,
				childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
		Object signObj = CacheUtils.get(CacheUtils.SIGN_CACHE,
				childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
		logger.info("signObj-->" + (signObj == null));
		CacheUtils.remove(CacheUtils.SIGN_CACHE,
				childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
		if (signObj == null) {
			signObj = signObjVaccid;
		}
		logger.info("signObjFinal-->" + (signObj == null));
		if (signObj != null) {
			String signStr = (String) signObj;
			// 初始化记录数据
			childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
			if (childVaccinaterecord != null) {
				// 判断签字是否存在
				// 打印签字信息
				code.put("sign", signStr);
				// base64 转换签字
				BASE64Decoder decoder = new BASE64Decoder();
				try {
					byte[] sign = decoder.decodeBuffer(signStr);
					if (null != sign && sign.length > 0) {
						childVaccinaterecord.setSignatureData(sign);
						childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
						// 查询该记录签字是否存在
						int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
						if (count == 0) {
							// 新增签字
							childVaccinaterecordService.insertSignatures(childVaccinaterecord);
						}
						// 修改签字状态
						childVaccinaterecord.setSignature(ChildVaccinaterecord.SIGNATURE_YES);
						childVaccinaterecordService.updateSignatures(childVaccinaterecord);
					}
				} catch (Exception e) {
					logger.error("微信签字base64转bytes失败", e.getMessage());
				}
				// 签字状态
			}
			maplist.put("success", true);
			logger.error("打印排号获取签字成功" + childVaccinaterecord.getNid().substring(0, 2) + "||"
					+ childVaccinaterecord.getVaccineid());
		} else {
			logger.error("打印排号获取签字失败" + childVaccinaterecord.getNid().substring(0, 2) + "||"
					+ childVaccinaterecord.getVaccineid());
		}
	}
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
if (signObj == null) {
signObj = signObjVaccid;
}
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
+ childVaccinaterecord.getVaccineid());
Object signObjVaccid = CacheUtils.get(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
logger.info("signObjVaccid-->" + (signObjVaccid == null));
CacheUtils.remove(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getNid().substring(0, 2));
Object signObj = CacheUtils.get(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
logger.info("signObj-->" + (signObj == null));
CacheUtils.remove(CacheUtils.SIGN_CACHE,
childVaccinaterecord.getChildid() + "_" + childVaccinaterecord.getVaccineid());
if (signObj == null) {
signObj = signObjVaccid;
}
logger.info("signObjFinal-->" + (signObj == null));
if (signObj != null) {
String signStr = (String) signObj;
// 初始化记录数据
childVaccinaterecord = childVaccinaterecordService.get(childVaccinaterecord);
if (childVaccinaterecord != null) {
// 判断签字是否存在
// 打印签字信息
code.put("sign", signStr);
// base64 转换签字
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] sign = decoder.decodeBuffer(signStr);
if (null != sign && sign.length > 0) {
childVaccinaterecord.setSignatureData(sign);
childVaccinaterecord.setStype(ChildVaccinaterecord.SIGNATURE_SOURCE_DJT);
// 查询该记录签字是否存在
int count = childVaccinaterecordService.querySignature(childVaccinaterecord);
if (count == 0) {
// 新增签字
childVaccinaterecordService.insertSignatures(childVaccinaterecord);
}
// 修改签字状态
childVaccinaterecord.setSignature(ChildVaccinaterecord.SIGNATURE_YES);
childVaccinaterecordService.updateSignatures(childVaccinaterecord);
}
} catch (Exception e) {
logger.error("微信签字base64转bytes失败", e.getMessage());