Commit 20f10179 authored by 黄重's avatar 黄重

正式站版本发布

parent 4c7b25aa
...@@ -172,7 +172,7 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen ...@@ -172,7 +172,7 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen
private EvaluationStepService evaluationStepService; private EvaluationStepService evaluationStepService;
private Menu menu; private Menu menu;
private Menu resultMenu; private Menu resultMenu;
// private ELink batchSignature_btn; private ELink batchSignature_btn;
// private StepButton curStep; // private StepButton curStep;
{ {
LogUtils.logClass(MyEvaluationStepComposite.class); LogUtils.logClass(MyEvaluationStepComposite.class);
...@@ -331,16 +331,16 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen ...@@ -331,16 +331,16 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen
signature_btn.setForeground(SWTResourceManager.getColor(60, 138, 226)); signature_btn.setForeground(SWTResourceManager.getColor(60, 138, 226));
menuFunctionUtils.addFunction(signature_btn, "EVALUATION_SIGNATURE"); menuFunctionUtils.addFunction(signature_btn, "EVALUATION_SIGNATURE");
// batchSignature_btn = new ELink(toolsComposite, SWT.NONE); batchSignature_btn = new ELink(toolsComposite, SWT.NONE);
// batchSignature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.BOLD)); batchSignature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.BOLD));
// batchSignature_btn.setForeground(SWTResourceManager.getColor(60, 138, 226)); batchSignature_btn.setForeground(SWTResourceManager.getColor(60, 138, 226));
// batchSignature_btn.setText("批量签名"); batchSignature_btn.setText("批量签名");
// batchSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png")); batchSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png"));
// batchSignature_btn.addMouseListener(new MouseAdapter() { batchSignature_btn.addMouseListener(new MouseAdapter() {
// public void mouseUp(MouseEvent e) { public void mouseUp(MouseEvent e) {
// openBatchSignatureDialog(); openBatchSignatureDialog();
// } }
// }); });
......
...@@ -306,49 +306,7 @@ public class ExpertBatchSignatureComposite extends Composite { ...@@ -306,49 +306,7 @@ public class ExpertBatchSignatureComposite extends Composite {
}); });
} }
// /**
// * 此处只是为加载北京ca签章控件
// */
// private void initHandSign() {
// //手写签字空白模版文件
// final File templateFile = FileConstants.getResourceFile(Constants.BLANK_PDF);
// String filePath = Constants.getSignFilePath(tenderProject.getId()).concat(Constants.BLANK_PDF);
// File signFile = new File(filePath);
// if(signFile.exists()) {
// signFile.delete();
// }
// if(templateFile.exists()) {
// FileUtils.copy(templateFile.getAbsolutePath(), filePath);
// }else {
// MessageDialog.openError(getShell(), "未找到模版!");
// }
// if (null == documentLoader1) {
// documentLoader1 = new BJCAHandPDFLoaderImpl(filePath);
//// documentLoader.showOrHiddenToolBar(false);
// documentLoader1.openDocument(composite_1, true);
// documentLoader1.addHandSignListener(new BJCAHandSignListener() {
// public void signScript() {
// Display.getDefault().syncExec(new Runnable() {
// public void run() {
// }
// });
// }
// public void signatrue(final boolean flag) {
// Display.getDefault().syncExec(new Runnable() {
// public void run() {
// if(flag) {
//
// }
// }
// });
// }
// });
// }
// documentLoader1.openFile(signFile);
// // 北京CA手写板不支持获取签章数.setSignatureCount(0);
// composite_1.layout();
// }
/** /**
* @Description: 刷新当前用户需要签章的报表 * @Description: 刷新当前用户需要签章的报表
* @author guoyr * @author guoyr
...@@ -361,6 +319,17 @@ public class ExpertBatchSignatureComposite extends Composite { ...@@ -361,6 +319,17 @@ public class ExpertBatchSignatureComposite extends Composite {
for (Control control : sinatureFile_composite.getChildren()) { for (Control control : sinatureFile_composite.getChildren()) {
control.dispose(); control.dispose();
} }
imageData = null;
signImageButton.setImage(null);
signImageButton.layout();
ResultEntity result = expertSignService.getExpertSignImage(curUser.getId());
if(result.getCode() == ResultEntity.SUCCESS) {
String data = ObjectUtils.getObjString(result.getData());
if(StringUtils.isNotEmpty(data)) {
imageData = data;
setImageView();
}
}
lblNewLabel_1.setText(expert.getUser().getUserName()); lblNewLabel_1.setText(expert.getUser().getUserName());
if(null == fileBtnMap){ if(null == fileBtnMap){
fileBtnMap = new HashMap<String, SignatureFileButton>(); fileBtnMap = new HashMap<String, SignatureFileButton>();
...@@ -381,9 +350,8 @@ public class ExpertBatchSignatureComposite extends Composite { ...@@ -381,9 +350,8 @@ public class ExpertBatchSignatureComposite extends Composite {
refleshSignFileList(); refleshSignFileList();
doRefreshMySignatureFileThread(); doRefreshMySignatureFileThread();
refreshMySignatureLoyout(); refreshMySignatureLoyout();
imageData = null;
signImageButton.setImage(null);
signImageButton.redraw();
} }
/** /**
...@@ -943,6 +911,18 @@ public class ExpertBatchSignatureComposite extends Composite { ...@@ -943,6 +911,18 @@ public class ExpertBatchSignatureComposite extends Composite {
// bacthSign_btn.setEnabled(true); // bacthSign_btn.setEnabled(true);
// } // }
imageData = documentLoader.getSignImage(); imageData = documentLoader.getSignImage();
if(StringUtils.isEmpty(imageData)) {
MessageDialog.openError(getShell(), "手写签名为空!");
return;
}
setImageView();
//此处只管调用设置,即使返回失败也
expertSignService.submitExertSignImage(imageData, curUser.getId());
}
private void setImageView() {
sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder(); sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();
try { try {
byte[] imageByte = decoder.decodeBuffer(imageData); byte[] imageByte = decoder.decodeBuffer(imageData);
...@@ -950,17 +930,13 @@ public class ExpertBatchSignatureComposite extends Composite { ...@@ -950,17 +930,13 @@ public class ExpertBatchSignatureComposite extends Composite {
Image image22 = imageResolver.getImage(imageByte,280, 180); Image image22 = imageResolver.getImage(imageByte,280, 180);
signImageButton.setImage(image22); signImageButton.setImage(image22);
signImageButton.layout(); signImageButton.layout();
if(StringUtils.isNotEmpty(imageData)) {
bacthSign_btn.setEnabled(true);
}
} catch (IOException e) { } catch (IOException e) {
} }
if(StringUtils.isEmpty(imageData)) {
MessageDialog.openError(getShell(), "手写签名为空!");
return;
}else {
bacthSign_btn.setEnabled(true);
}
} }
@Override @Override
protected void checkSubclass() { protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components // Disable the check that prevents subclassing of SWT components
......
...@@ -177,7 +177,7 @@ public class EvaluationReportComposite extends Composite { ...@@ -177,7 +177,7 @@ public class EvaluationReportComposite extends Composite {
private Menu menu; private Menu menu;
private MenuFunctionUtils menuFunctionUtils = new MenuFunctionUtils(); private MenuFunctionUtils menuFunctionUtils = new MenuFunctionUtils();
// private ELink batchSign_btn; private ELink batchSign_btn;
{ {
LogUtils.logClass(EvaluationReportComposite.class); LogUtils.logClass(EvaluationReportComposite.class);
} }
...@@ -383,16 +383,16 @@ public class EvaluationReportComposite extends Composite { ...@@ -383,16 +383,16 @@ public class EvaluationReportComposite extends Composite {
label.setForeground(ColorConstants.SKIN_FOREGROUND); label.setForeground(ColorConstants.SKIN_FOREGROUND);
label.setText(Messages.MyReport); label.setText(Messages.MyReport);
// batchSign_btn = new ELink(reportTitle_composte, SWT.NONE); batchSign_btn = new ELink(reportTitle_composte, SWT.NONE);
// batchSign_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/report_all.png")); batchSign_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/report_all.png"));
// batchSign_btn.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE)); batchSign_btn.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
// batchSign_btn.addMouseListener(new MouseAdapter() { batchSign_btn.addMouseListener(new MouseAdapter() {
// public void mouseUp(MouseEvent mouseevent) { public void mouseUp(MouseEvent mouseevent) {
//// mergerPdfAction(); // mergerPdfAction();
// batchSignAction(); batchSignAction();
// } }
// }); });
// batchSign_btn.setText("批量签名"); batchSign_btn.setText("批量签名");
synthesisPdf_btn = new ELink(reportTitle_composte, SWT.NONE); synthesisPdf_btn = new ELink(reportTitle_composte, SWT.NONE);
synthesisPdf_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/expend.png")); synthesisPdf_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/expend.png"));
......
...@@ -72,4 +72,54 @@ public class UserSignFileService { ...@@ -72,4 +72,54 @@ public class UserSignFileService {
} }
return new ResultEntity<String>(null,"请求失败",ResultEntity.FAIL); return new ResultEntity<String>(null,"请求失败",ResultEntity.FAIL);
} }
/**
* @Description: 获得当前项目的流转签章文件
* @author huangz
* @param tenderId
* @return
*/
public ResultEntity<String> getExpertSignImage( String userId){
String strWebServerUrl = Constants.getServiceUrl( URL + "/getExpertSignImage");
Map<String, Object> param = new HashMap<String, Object>();
param.put("userId", userId);
try {
String result = NetworkRequest.post(strWebServerUrl, param);
System.out.println(result);
if(ResultStatus.getReultStatusIsNotEmpty(result)){
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("data", Expert.class);
return JsonUtil.strToObject(result, ResultEntity.class, classMap);
}
return new ResultEntity<String>(null,"请求失败",ResultEntity.FAIL);
} catch (Exception e) {
// logger.error(e.getMessage(), e);
// return null;
}
return new ResultEntity<String>(null,"请求失败",ResultEntity.FAIL);
}
/**
* @Description: 获得当前项目的流转签章文件
* @author mazc
* @param tenderId
* @return
*/
public ResultEntity<Expert> submitExertSignImage( String signImage, String userId){
String strWebServerUrl = Constants.getServiceUrl( URL + "/submitExertSignImage");
Map<String, Object> param = new HashMap<String, Object>();
param.put("signImage", signImage );
param.put("userId", userId);
try {
String result = NetworkRequest.post(strWebServerUrl, param);
if(ResultStatus.getReultStatusIsNotEmpty(result)){
Map<String, Class> classMap = new HashMap<String, Class>();
classMap.put("data", Expert.class);
return JsonUtil.strToObject(result, ResultEntity.class, classMap);
}
return new ResultEntity<Expert>(null,"请求失败",ResultEntity.FAIL);
} catch (Exception e) {
// logger.error(e.getMessage(), e);
// return null;
}
return new ResultEntity<Expert>(null,"请求失败",ResultEntity.FAIL);
}
} }
...@@ -498,9 +498,9 @@ public class ImageButton extends CLabel{ ...@@ -498,9 +498,9 @@ public class ImageButton extends CLabel{
} }
public void setImage(Image image){ public void setImage(Image image){
checkWidget(); checkWidget();
if(null != image){ this.image = image;
this.image = image; // if(null != image){
} // }else {
redraw(); redraw();
} }
public void setImage(Image image, int width, int height){ public void setImage(Image image, int width, int height){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment