Commit c37b8c75 authored by 王亚宁's avatar 王亚宁

Merge branch 'bug/master/#160' into 'master'

#261 评标管理新增的本地用户删除失效 #252 并表办法-价格指标-关联要计算得分的投标报价,首次点击下拉框总报价(含税)字段重复(中) #160 开标工具bug (监督人相关) #159 推荐组长及失信被执行人查询卡顿 #158 初审时否决相关意见 #157 报表生成失败问题 #156 专家签到时,被抽取专业以及姓名错乱

See merge request !3
parents 466be37c 8c0d5f80
......@@ -479,8 +479,13 @@ public class FactorEvaluationComposite extends EvaluationView {
evaluationButton = new ELink(supplier_composite, SWT.NONE);
evaluationButton.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png"));
evaluationButton.setEnabled(false);
evaluationButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
if (!evaluationButton.getEnabled()) {
return;
}
setSupplierEvaluationOpinion();
}
});
......@@ -1105,10 +1110,10 @@ public class FactorEvaluationComposite extends EvaluationView {
isShowBidFileOpinion = false;
}
if (curStep.getStepType().equals(com.gx.obe.components.core.enumeration.EvaluationStepEnum.COMPLIANCE)) {
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, evaluationButton, SWT.NONE);
} else {
if (null != curStep.getSummaryType() && curStep.getSummaryType().equals(com.gx.obe.components.core.enumeration.EvaluationStepEnum.SUMMARY_SCORE_BY_QUALIFIED)) {
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, evaluationButton, SWT.NONE);
} else {
evaluationTable = new ScoreEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
}
......
......@@ -18,6 +18,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.core.widgets.EMenu;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.custom.CLabel;
......@@ -113,6 +114,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
private Composite evaluationTableComposite;
private Composite composite_9;
private Text factor_evaluation_opinion;
private ELink evaluationButton;
private StyledText evaluation_factor_memo;
private List<EvaluationFactor> evaluationFactorList = new ArrayList<EvaluationFactor>();
private int maxLevel = 1;
......@@ -153,6 +155,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
private ExpertEvaluationResultService expertEvaluationResultService;
private SupplierOpeningResultService supplierOpeningResultService;
private Map<String, String> objectiveFactorIdMap = new HashMap<String, String>();
private Map<Integer,Object> colContent = new HashMap<>();
private final Map<Keys, Color> objectiveBackgroundMap = new HashMap<Keys, Color>();
private boolean sameScoreCheck = true;
/**
......@@ -214,8 +217,9 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
* @param parent
* @param style
*/
public ComplianceEvaluationTableComposite(Composite parent, int style) {
public ComplianceEvaluationTableComposite(Composite parent,ELink evaluationBtn, int style) {
super(parent, style);
evaluationButton = evaluationBtn;
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
......@@ -1491,8 +1495,10 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
ExpertEvaluationResult expertEvaluationResult = expertEvaluationResultMap.get(supplier.getId());
if (null != expertEvaluationResult && null != expertEvaluationResult.getAccessment()) {
if (expertEvaluationResult.getAccessment().equals(EvaluationStepEnum.QUALIFIED)) {
colContent.put(col, EVAL_ACCESSMENT_YES);
return EVAL_ACCESSMENT_YES;
} else if (expertEvaluationResult.getAccessment().equals(EvaluationStepEnum.UNQUALIFIED)) {
colContent.put(col, EVAL_ACCESSMENT_NO);
return EVAL_ACCESSMENT_NO;
}
}
......@@ -1502,7 +1508,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
}
};
commKTableModel.setCellContentRender(contentRender);
// 设置单元格渲染器
final FixedWrapCellRenderer fixedWrapCellRenderer = new FixedWrapCellRenderer();
final TextWrapCellRenderer textWrapCellRenderer = new TextWrapCellRenderer();
......@@ -1600,7 +1606,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
isUnqualified = true;
}
expertEvaluationResult.setAccessment(isUnqualified ? EvaluationStepEnum.UNQUALIFIED : EvaluationStepEnum.QUALIFIED);
//如果是合格的,意见不是空
// boolean changeOpinion = false;
// changeOpinion = !StringUtils.isNotEmpty(evalFactorResult.getEvaluationOpinion()) && EvaluationFactorEnum.CONFORM.equals(evalFactorResult.getEvaluationResult());
......@@ -1608,7 +1614,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
// if ((EvaluationFactorEnum.UNCONFORM.equals(evalFactorResult.getEvaluationResult()) && isUnqualified) || changeOpinion) {
// if ((EvaluationFactorEnum.UNCONFORM.equals(evalFactorResult.getEvaluationResult()) && isUnqualified)) {
if (EvaluationFactorEnum.UNCONFORM.equals(content.toString())) {
EvaluationOpinionDialog dialog = new EvaluationOpinionDialog(getShell(), tenderProject, supplier, Constants.USER, expertEvaluationResult,new CallBack() {
public void callBackBoolean(final boolean isEmpyt) {
if(isEmpyt) {
......@@ -1763,6 +1769,12 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
if (null != supplier && null != evaluationFactor) {
evalFactorResult = supplierEvaluationFactorResultMap.get(supplier.getId()).get(evaluationFactor.getId());
}
if(StringUtils.isNotEmpty(colContent.get(col).toString())) {
evaluationButton.setEnabled(!EVAL_ACCESSMENT_YES.equals(colContent.get(col).toString()));
//重绘控件,控件刷新具有滞后性
evaluationButton.redraw();
}
resultClickEventAction(supplier, evaluationFactor, evalFactorResult);
return;
}
......
......@@ -864,9 +864,9 @@ public class ExpertSignEvaluationComposite extends Composite {
userService.updateAssignProperty(user, updatePropertyList.toArray(new String[updatePropertyList.size()]));
}
}else {
return false;
return signFlag;
}
return true;
return signFlag;
}
......
......@@ -10,6 +10,8 @@ import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
......@@ -57,7 +59,15 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
*/
public ElectionExpertLeaderComposite(Composite parent, TenderProjectEntity tenderProject, Expert expert) {
super(parent, SWT.NONE);
addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if(null != refreshVotesThread) {
refreshVotesThread.stop();
}
}
});
this.tenderProject = tenderProject;
this.curExpert = expert;
......@@ -96,7 +106,6 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
*/
private void init() {
refreshExpertAction();
refreshVotesThread = new RefreshVotesThread(tenderProject, new RefreshVotesThread.RefreshVotesListener() {
public void refreshExpertVotes(final boolean isCanVote, final Map<String, Integer> votesMap, final int turnCount, final int noVoteCount) {
Display.getDefault().syncExec(new Runnable() {
......@@ -116,6 +125,7 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
}
}
}
expertVoteComposite.redraw();
}
if (isCanVote) {
message_label.setText(MessageFormat.format(Messages.Tips_voteExpertLeaderRound, turnCount));
......@@ -170,11 +180,14 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
composite.initDate(tenderProject, expert, curExpert);
composite.refreshVote(expert.getVotes());
composite.setVoteEnable(false);
composite.redraw();
composite.addExpertVoteListener(new ExpertVoteComposite.ExpertVoteListener() {
@Override
public void expertVote() {
if(!message_label.isDisposed()){
for (String expertId : expertVoteCompositeMap.keySet()) {
expertVoteCompositeMap.get(expertId).setVoteEnable(false);
expertVoteCompositeMap.get(expertId).redraw();
}
message_label.setText(Messages.Tips_youHaveVoted);
}
......@@ -186,6 +199,7 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
@Override
public void dispose() {
System.out.println("ElectionExpertLeaderComposite is being disposed");
if(null != refreshVotesThread) {
refreshVotesThread.stop();
}
......
......@@ -221,13 +221,14 @@ public class ExpertVoteComposite extends Composite {
}
canRefresh = false;
voteLink.setEnabled(false);
redraw();
if (TenderProjectEnum.GKZB.equals(tenderProject.getTenderMethod()) || TenderProjectEnum.YQZB.equals(tenderProject.getTenderMethod())) {
if (ExpertEnum.BIDDING.equals(targetExpert.getExpertType())) {
MessageDialog.openWarning(getShell(), "当前专家为招标代表,不可以推荐为专家组长!");
return;
}
}
voteLink.setText("投票中...");
voteLink.setText("正在投票中...");
voteLink.getParent().layout();
new Thread(new Runnable(){
public void run(){
......@@ -236,7 +237,7 @@ public class ExpertVoteComposite extends Composite {
public void run(){
if(!voteLink.isDisposed()){
voteLink.setText(Messages.Button_vote);
voteLink.getParent().layout();
// voteLink.getParent().layout();
if (voteFlag) {
refreshVote(votes++);
listener.expertVote();
......@@ -244,8 +245,8 @@ public class ExpertVoteComposite extends Composite {
MessageDialog.openInformation(getShell(), Messages.Tips_operateFail);
voteLink.setEnabled(true);
}
redraw();
}
}
});
canRefresh = true;
......@@ -289,10 +290,14 @@ public class ExpertVoteComposite extends Composite {
*/
public void setVoteEnable(boolean canVote) {
if(canRefresh) {
voteLink.setEnabled(canVote);
this.voteLink.setEnabled(canVote);
}
}
public void redraw() {
this.voteLink.redraw();
}
public void addExpertVoteListener(ExpertVoteListener listener) {
this.listener = listener;
}
......
......@@ -48,6 +48,17 @@ public class PriceParam implements Serializable{
// private StringBuilder desc;
private StringBuilder formula;//组装公式描述
private String evalStructMessage;
public String getEvalStructMessage() {
return evalStructMessage;
}
public void setEvalStructMessage(String evalStructMessage) {
this.evalStructMessage = evalStructMessage;
}
public BasePriceRangeParam getSpecimenParam() {
if(null == specimenParam) {
specimenParam = new BasePriceRangeParam();
......
......@@ -596,6 +596,8 @@ EvalContent=\u8BC4\u5BA1\u5185\u5BB9
EvalEndTime=\u8BC4\u6807\u7ED3\u675F\u65F6\u95F4
EvalExpert=\u8BC4\u6807\u4E13\u5BB6
EvalExplain=\u8BC4\u5BA1\u8BF4\u660E
EvalExplainPrice=\u8BC4\u6807\u57FA\u51C6\u4EF7\u8BA1\u7B97\u65B9\u6CD5
BidExplainPrice=\u6295\u6807\u62A5\u4EF7\u8BA1\u7B97\u65B9\u6CD5
EvalFactor=\u8BC4\u5BA1\u6307\u6807
EvalGroup=\u8BC4\u5BA1\u5355\u5143
EvalManage=\u8BC4\u6807\u7BA1\u7406
......
......@@ -517,6 +517,8 @@ public class Messages extends NLS {
public static String EvalFactor;
public static String EvalContent;
public static String EvalExplain;
public static String EvalExplainPrice;
public static String BidExplainPrice;
public static String Explain;
public static String Description;
public static String ScoreDecimalDigits;
......
......@@ -596,6 +596,8 @@ EvalContent=\u8BC4\u5BA1\u5185\u5BB9
EvalEndTime=\u8BC4\u6807\u7ED3\u675F\u65F6\u95F4
EvalExpert=\u8BC4\u6807\u4E13\u5BB6
EvalExplain=\u8BC4\u5BA1\u8BF4\u660E
EvalExplainPrice=\u8BC4\u6807\u57FA\u51C6\u4EF7\u8BA1\u7B97\u65B9\u6CD5
BidExplainPrice=\u6295\u6807\u62A5\u4EF7\u8BA1\u7B97\u65B9\u6CD5
EvalFactor=\u8BC4\u5BA1\u6307\u6807
EvalGroup=\u8BC4\u5BA1\u5355\u5143
EvalManage=\u8BC4\u6807\u7BA1\u7406
......
#\u7cfb\u7edf\u7248\u672c
version=OBEV7.7.9.20230602
version=OBEV7.7.9.
keyCharacter=
#\u6b63\u5f0f\u7248\u672c\u68c0\u67e5\u5347\u7ea7\u7f16\u7801
versionUpdateType=OBE_FinalService
......
#\u7cfb\u7edf\u7248\u672c
version=OBEV7.7.9.20230602
version=OBEV7.7.9.20240611
keyCharacter=g
versionUpdateType=OBE_Service
#\u6d4b\u8bd5\u7ad9\u4e13\u5bb6\u7b7e\u670d\u52a1
......
......@@ -501,17 +501,7 @@ public class EvaluationFactorsManagerComposite extends Composite {
isInProgress = tenderProjectService.isInProgress(tenderProjectEntity.getId(), null);
List<String> nodeList = evaluationStepService.getIdByTenderIdCount(tenderProjectEntity.getId());
isExistEvaluationStep = CollectionUtils.isNotNull(nodeList);
if(isInProgress || isExistEvaluationStep) {
return;
}
final int factorCount = evaluationFactorService.getFactorCountByTenderId(tenderProjectEntity.getId());
// 验证项目下是否存在评审指标,如果没有则自动导入招标文件或投标文件下的指标信息。
if (factorCount > 0) {
return;
}
// 导入评审指标线程(项目下没有评审指标,先从招标文件下找(EvalFactors.xml),未找到则再从投标文件下找(EvalFactors.xml)。)
new EvaluationFactorXmlResolverThread(tenderProjectEntity, new CallBack() {
EvaluationFactorXmlResolverThread xmlResolverThread = new EvaluationFactorXmlResolverThread(projectAction, new CallBack() {
public void callBackBoolean(boolean bool) {
Display.getDefault().asyncExec(new Runnable(){
public void run(){
......@@ -522,7 +512,18 @@ public class EvaluationFactorsManagerComposite extends Composite {
}
});
}
}).start();
});
xmlResolverThread.parserStructProject(projectAction);
if(isInProgress || isExistEvaluationStep) {
return;
}
final int factorCount = evaluationFactorService.getFactorCountByTenderId(tenderProjectEntity.getId());
// 验证项目下是否存在评审指标,如果没有则自动导入招标文件或投标文件下的指标信息。
if (factorCount > 0) {
return;
}
// 导入评审指标线程(项目下没有评审指标,先从招标文件下找(EvalFactors.xml),未找到则再从投标文件下找(EvalFactors.xml)。)
xmlResolverThread.start();
}
}));
myThreadSet.setMessage(Messages.Tips_requesting);
......
......@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.text.MessageFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -60,6 +61,7 @@ import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SerializeUtils;
import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
......@@ -84,6 +86,7 @@ public class PriceFactorsManagerComposite extends Composite {
private Text factor_name_text;
private Text factor_memo_text;
private Text factor_memo_text1;
private ELink add_btn;
private ELink add_sub_btn;
private ELink import_bid_price_factor;
......@@ -132,7 +135,6 @@ public class PriceFactorsManagerComposite extends Composite {
private EvaluationStepService evaluationStepService;
private EvaluationFactorService evaluationFactorService;
private ProjectRuleService projectRuleService;
private Action projectAction;
private ELink applyToOtherFactorBtn;
{
LogUtils.logClass(PriceFactorsManagerComposite.class);
......@@ -156,7 +158,9 @@ public class PriceFactorsManagerComposite extends Composite {
imageResolver.disposite();
}
});
this.projectAction = projectAction;
this.tenderProject = projectAction.getTenderProject();
this.menu = projectAction.getMenu();
this.projectRule = projectAction.getTenderProjectRule();
composite_1 = new Composite(this, SWT.NONE);
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
......@@ -535,17 +539,44 @@ public class PriceFactorsManagerComposite extends Composite {
gd_formula_text.widthHint = 200;
formula_text.setLayoutData(gd_formula_text);
Label label_1 = new Label(composite_5, SWT.RIGHT);
label_1.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_1.setText(Messages.EvalExplain + ":");
factor_memo_text = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText.widthHint = 200;
gd_factorMemoText.heightHint = 50;
factor_memo_text.setLayoutData(gd_factorMemoText);
factor_memo_text.setTextLimit(1000);
// 结构化区分渲染
if(isStruct()) {
Label label_1 = new Label(composite_5, SWT.RIGHT);
label_1.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_1.setText(Messages.EvalExplainPrice + ":");
factor_memo_text1 = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText.widthHint = 200;
gd_factorMemoText.heightHint = 50;
factor_memo_text1.setLayoutData(gd_factorMemoText);
factor_memo_text1.setTextLimit(1000);
Label label_0 = new Label(composite_5, SWT.RIGHT);
label_0.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_0.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_0.setText(Messages.BidExplainPrice + ":");
factor_memo_text = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText_1 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText_1.widthHint = 200;
gd_factorMemoText_1.heightHint = 50;
factor_memo_text.setLayoutData(gd_factorMemoText_1);
factor_memo_text.setTextLimit(1000);
}else {
Label label_1 = new Label(composite_5, SWT.RIGHT);
label_1.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_1.setText(Messages.EvalExplain + ":");
factor_memo_text = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText.widthHint = 200;
gd_factorMemoText.heightHint = 50;
factor_memo_text.setLayoutData(gd_factorMemoText);
factor_memo_text.setTextLimit(1000);
}
scrolledComposite.setContent(scroContentComposite);
scrolledComposite.setMinSize(scroContentComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
......@@ -572,10 +603,6 @@ public class PriceFactorsManagerComposite extends Composite {
* @author guoyr
*/
private void init(){
this.tenderProject = projectAction.getTenderProject();
this.menu = projectAction.getMenu();
this.projectRule = projectAction.getTenderProjectRule();
applyToOtherPackBtn.setText(MessageFormat.format(Messages.Button_applyToOthers, com.gx.obe.components.core.I18N.getString(I18NEnum.SUBPACKAGE, tenderProject.getTenderType())));
bidPriceService = new BidPriceService();
tenderProjectService = new TenderProjectService();
......@@ -592,7 +619,8 @@ public class PriceFactorsManagerComposite extends Composite {
WidgetUtils.setControlVisible(applyToOtherPackBtn, null != tenderProject.getParentId());
menuOpenImage = imageResolver.loadImage(IconsActivator.PLUGIN_ID,"icons/tree_parent.png");
menuImage = imageResolver.loadImage(IconsActivator.PLUGIN_ID,"icons/tree_item.png");
menuImage = imageResolver.loadImage(IconsActivator.PLUGIN_ID,"icons/tree_item.png");
// 初始化检查
initInputListener();
// 添选中事件和右键菜单事件
factors_grid.addListener(SWT.Selection, new GridSelectionListener(){
......@@ -655,6 +683,10 @@ public class PriceFactorsManagerComposite extends Composite {
max_score_text.addKeyListener(factorMaxScoreListener);
}
private boolean isStruct() {
return tenderProject.getEvaluationParamByKey(tenderProject.getId() + "struct");
}
/**
* @Description: 设置投标报价
* @author guoyr
......@@ -678,14 +710,14 @@ public class PriceFactorsManagerComposite extends Composite {
}
// 只有存在多个报价时,才显示总报价
// if(bidPriceMap.keySet().size() > 1){
BidPrice bidPriceTotal = new BidPrice();
bidPriceTotal.setBidPriceCode(BidPrice.BID_PRICE_TOTAL_CODE);
bidPriceTotal.setBidPriceName(Messages.BidPriceTotal);
if(null != bidPriceList && bidPriceList.size() > 1){
bidPriceTotal.setBidPriceName(bidPriceList.get(0).getBidPriceName());
}
bidPriceList.add(0, bidPriceTotal);
// if(StringUtils.isEmpty(bid_price_text.getText()) || bidPriceList.size() < 2) {
// BidPrice bidPriceTotal = new BidPrice();
// bidPriceTotal.setBidPriceCode(BidPrice.BID_PRICE_TOTAL_CODE);
// bidPriceTotal.setBidPriceName(Messages.BidPriceTotal);
// bidPriceList.add(bidPriceTotal);
// }
// }
// }
if(null != bidPriceList && bidPriceList.size() > 0){
BidPriceSelectShell shell = new BidPriceSelectShell(getShell(), bidPriceList);
......@@ -847,7 +879,12 @@ public class PriceFactorsManagerComposite extends Composite {
formula_text.setForeground(SWTResourceManager.getColor(10, 10, 10));
formula_text.setText(formula);
}
if(isStruct()) {
factor_memo_text1.setText(priceParam.getEvalStructMessage());
}
}
/**
* @Description: 刷新指标树
* @author guoyr
......
......@@ -591,7 +591,8 @@ public class SupplierEvaluactionOpinionComposite extends Composite {
}
return;
}
if(supplierEvaluationResultService.saveSupplierEvaluationOpinion(true, tenderProjectEntity.getId(), supplier.getId(), requirementText.getText(), supplierEvalOpinionText.getText(),null !=supplierEvaluationResult.getVetoType()? supplierEvaluationResult.getVetoType(): null )){
String vetoType = null !=supplierEvaluationResult.getVetoType()? supplierEvaluationResult.getVetoType(): null;
if(supplierEvaluationResultService.saveSupplierEvaluationOpinion(true, tenderProjectEntity.getId(), supplier.getId(), requirementText.getText(), supplierEvalOpinionText.getText(), vetoType)){
supplierEvaluationResult.setApplyUserId(null);
MessageDialog.openShortMessage(Messages.Tips_saveSuccess);
}else {
......
package com.gx.obe.management.dialog;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.listener.VerifyCardIdListener;
import org.eclipse.swt.core.listener.VerifyEnNameListener;
import org.eclipse.swt.core.listener.VerifyPasswordListener;
import org.eclipse.swt.core.listener.VerifyPhoneListener;
import org.eclipse.swt.core.listener.VerifyRequiredListener;
import org.eclipse.swt.core.utils.FileDialogUtils;
import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.core.utils.ValidateUtils;
import org.eclipse.swt.core.widgets.EButton;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
......@@ -48,9 +37,6 @@ import com.gx.obe.business.enumeration.UserEnum;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.common.dialog.SelectUserCommonDialog;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.http.util.Base64;
import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.LogUtils;
......@@ -64,7 +50,6 @@ import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.service.UserRoleService;
import com.gx.obe.web.service.UserService;
import com.gx.obe.web.service.WorkerService;
import com.gx.obe.config.utils.InputStreamUtil;
import com.gx.utils.NowTimeUtils;
import org.eclipse.swt.core.utils.WidgetUtils;
import com.swtdesigner.ResourceManager;
......@@ -80,28 +65,29 @@ public class EditWorkerDialog extends EDialog {
private WorkerService workerService;
private Worker worker;
private AuthUser user;
private boolean changeAvatorImage = false;
private ImageResolver imageResolver = new ImageResolver();
private Image defaultAvatorImage;
private Composite genderComposite;
private ImageButton userAvatorLabel;
//private boolean changeAvatorImage = false;
// private ImageResolver imageResolver = new ImageResolver();
//private Image defaultAvatorImage;
//private Composite genderComposite;
//private ImageButton userAvatorLabel;
private Text userNameText;
private Text passwordText;
private Text passwordAgainText;
//private Text passwordText;
//private Text passwordAgainText;
private Text IDCardText;
private Text professionalTitleText;
private Text companyText;
private Text specialtyText;
//private Text professionalTitleText;
//private Text companyText;
//private Text specialtyText;
private Text phoneText;
private Text userAccountText;
private Text areaCodeText;
//private Text userAccountText;
//private Text areaCodeText;
private EButton saveUserBtn;
private TenderProjectEntity tenderProjectEntity;
private String workerType;
private ELink link;
private ELink createAccountLink;
private Button initialPasswordButton;
private final String DEFAULT_PASSWORD = PropertiesUtils.getProperty(ConfigConstants.EXPERT_DEFAULT_PASSWORD, "123456");
private ModifyListener modifyListener;
//private ELink createAccountLink;
//private Button initialPasswordButton;
//private final String DEFAULT_PASSWORD = PropertiesUtils.getProperty(ConfigConstants.EXPERT_DEFAULT_PASSWORD, "123456");
{
LogUtils.logClass(EditWorkerDialog.class);
......@@ -114,6 +100,7 @@ public class EditWorkerDialog extends EDialog {
this.workerType = workerType;
userService = new UserService();
userRoleService = new UserRoleService();
modifyListener = e -> validateInputs();
}
@Override
......@@ -126,6 +113,8 @@ public class EditWorkerDialog extends EDialog {
gl_content.marginHeight = 0;
gl_content.marginWidth = 0;
content.setLayout(gl_content);
//支持dialog可拖拽
//addDragSupport(getShell());
Composite compAll = new Composite(content, SWT.NONE);
compAll.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
......@@ -145,7 +134,7 @@ public class EditWorkerDialog extends EDialog {
userNameLabel.setText(Messages.FullName + ":");
Composite userNameComposite = new Composite(compContent, SWT.NONE);
userNameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
userNameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
GridLayout gl_userNameComposite = new GridLayout(2, false);
gl_userNameComposite.horizontalSpacing = 0;
gl_userNameComposite.verticalSpacing = 0;
......@@ -154,192 +143,200 @@ public class EditWorkerDialog extends EDialog {
userNameComposite.setLayout(gl_userNameComposite);
userNameText = new Text(userNameComposite, SWT.BORDER | SWT.DRAW_TAB);
userNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
GridData gd_userNameText = new GridData(SWT.FILL, SWT.CENTER, true, false,1,1);
gd_userNameText.widthHint = 300; // 设置宽度提示
userNameText.setLayoutData(gd_userNameText);
userNameText.setTextLimit(20);
userNameText.addVerifyListener(new VerifyRequiredListener(userNameText, "姓名不能为空!"));
userNameText.addModifyListener(modifyListener);
GridData gd_link = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
link = new ELink(userNameComposite, SWT.NONE);
link.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
queryUserAction();
}
});
link.setLayoutData(gd_link);
link.setText("检测");
link.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/query.png"));
Composite composite_1 = new Composite(compContent, SWT.NONE);
GridLayout gl_composite_1 = new GridLayout(1, false);
gl_composite_1.marginHeight = 0;
composite_1.setLayout(gl_composite_1);
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.TOP, false, true, 1, 6);
gd_composite_1.widthHint = 150;
gd_composite_1.heightHint = 180;
composite_1.setLayoutData(gd_composite_1);
userAvatorLabel = new ImageButton(composite_1, SWT.BORDER | SWT.BOTTOM);
userAvatorLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
userAvatorLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/male_96.png"));
userAvatorLabel.setBorderColor(ColorConstants.BORDER_LINE_COLOR);
EButton button_2 = new EButton(composite_1, SWT.NONE);
button_2.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
uploadUserAvatarAction();
}
});
button_2.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/upload.png"));
button_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
button_2.setText(Messages.UploadPicture);
CLabel usLoginAccountLabel = new CLabel(compContent, SWT.NONE);
usLoginAccountLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
usLoginAccountLabel.setText(Messages.Account + ":");
Composite composite = new Composite(compContent, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
GridLayout gl_composite = new GridLayout(2, false);
gl_composite.marginWidth = 0;
gl_composite.marginHeight = 0;
gl_composite.horizontalSpacing = 0;
gl_composite.verticalSpacing = 0;
composite.setLayout(gl_composite);
userAccountText = new Text(composite, SWT.BORDER);
userAccountText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
userAccountText.setTextLimit(20);
userAccountText.addVerifyListener(new VerifyEnNameListener());
userAccountText.addVerifyListener(new VerifyRequiredListener(userAccountText, "账号不能为空!"));
createAccountLink = new ELink(composite, SWT.NONE);
createAccountLink.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
createAccountAction();
}
});
createAccountLink.setText("生成账号");
createAccountLink.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/pen.png"));
CLabel passwordLabel = new CLabel(compContent, SWT.NONE);
passwordLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
passwordLabel.setText(Messages.Password + ":");
Composite passwordCmposite = new Composite(compContent, SWT.NONE);
GridLayout gl_passwordCmposite = new GridLayout(2, false);
gl_passwordCmposite.horizontalSpacing = 0;
gl_passwordCmposite.marginHeight = 0;
gl_passwordCmposite.marginWidth = 0;
passwordCmposite.setLayout(gl_passwordCmposite);
passwordCmposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
passwordText = new Text(passwordCmposite, SWT.BORDER | SWT.PASSWORD | SWT.DRAW_TAB);
passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
passwordText.setTextLimit(32);
passwordText.addVerifyListener(new VerifyRequiredListener(passwordText, MessageFormat.format(Messages.Tips_required, Messages.Password)));
CLabel passwordAgainLabel = new CLabel(compContent, SWT.NONE);
passwordAgainLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
passwordAgainLabel.setText(Messages.PasswordConfirm + ":");
passwordAgainText = new Text(compContent, SWT.BORDER | SWT.PASSWORD | SWT.DRAW_TAB);
passwordAgainText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
passwordAgainText.addVerifyListener(new VerifyRequiredListener(passwordText, "确认密码不能为空!"));
passwordAgainText.setTextLimit(32);
Composite initialPasswordComposite = new Composite(passwordCmposite, SWT.NONE);
GridLayout gl_initialPasswordComposite = new GridLayout(1, false);
gl_initialPasswordComposite.marginHeight = 0;
initialPasswordComposite.setLayout(gl_initialPasswordComposite);
initialPasswordComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));
initialPasswordButton = new Button(initialPasswordComposite, SWT.CHECK);
initialPasswordButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
initialPasswordSelectedAction();
}
});
initialPasswordButton.setText(Messages.DefaultPassword);
Label passwordTips = new Label(passwordCmposite, SWT.WRAP);
GridData gd_passwordTips = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
gd_passwordTips.widthHint = 300;
passwordTips.setLayoutData(gd_passwordTips);
passwordTips.setText(VerifyPasswordListener.PASSWOR_TIPS);
passwordTips.setForeground(ColorConstants.NOTE_TIPS_COLOR);
CLabel label = new CLabel(compContent, SWT.NONE);
label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
label.setText(Messages.Gender + ":");
genderComposite = new Composite(compContent, SWT.NONE);
genderComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
GridLayout gl_genderComposite = new GridLayout(2, false);
gl_genderComposite.marginHeight = 0;
genderComposite.setLayout(gl_genderComposite);
// Composite composite_1 = new Composite(compContent, SWT.NONE);
// GridLayout gl_composite_1 = new GridLayout(1, false);
// gl_composite_1.marginHeight = 0;
// composite_1.setLayout(gl_composite_1);
// GridData gd_composite_1 = new GridData(SWT.FILL, SWT.TOP, false, true, 1, 6);
// gd_composite_1.widthHint = 150;
// gd_composite_1.heightHint = 180;
// composite_1.setLayoutData(gd_composite_1);
//
// userAvatorLabel = new ImageButton(composite_1, SWT.BORDER | SWT.BOTTOM);
// userAvatorLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
// userAvatorLabel.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/male_96.png"));
// userAvatorLabel.setBorderColor(ColorConstants.BORDER_LINE_COLOR);
//
// EButton button_2 = new EButton(composite_1, SWT.NONE);
// button_2.addMouseListener(new MouseAdapter() {
// public void mouseUp(MouseEvent e) {
// uploadUserAvatarAction();
// }
// });
// button_2.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/upload.png"));
// button_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// button_2.setText(Messages.UploadPicture);
//
// CLabel usLoginAccountLabel = new CLabel(compContent, SWT.NONE);
// usLoginAccountLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// usLoginAccountLabel.setText(Messages.Account + ":");
//
// Composite composite = new Composite(compContent, SWT.NONE);
// composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
// GridLayout gl_composite = new GridLayout(2, false);
// gl_composite.marginWidth = 0;
// gl_composite.marginHeight = 0;
// gl_composite.horizontalSpacing = 0;
// gl_composite.verticalSpacing = 0;
// composite.setLayout(gl_composite);
//
// userAccountText = new Text(composite, SWT.BORDER);
// userAccountText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// userAccountText.setTextLimit(20);
// userAccountText.addVerifyListener(new VerifyEnNameListener());
// userAccountText.addVerifyListener(new VerifyRequiredListener(userAccountText, "账号不能为空!"));
//
// createAccountLink = new ELink(composite, SWT.NONE);
// createAccountLink.addMouseListener(new MouseAdapter() {
// public void mouseUp(MouseEvent e) {
// createAccountAction();
// }
// });
// createAccountLink.setText("生成账号");
// createAccountLink.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/pen.png"));
//
// CLabel passwordLabel = new CLabel(compContent, SWT.NONE);
// passwordLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// passwordLabel.setText(Messages.Password + ":");
//
// Composite passwordCmposite = new Composite(compContent, SWT.NONE);
// GridLayout gl_passwordCmposite = new GridLayout(2, false);
// gl_passwordCmposite.horizontalSpacing = 0;
// gl_passwordCmposite.marginHeight = 0;
// gl_passwordCmposite.marginWidth = 0;
// passwordCmposite.setLayout(gl_passwordCmposite);
// passwordCmposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
//
// passwordText = new Text(passwordCmposite, SWT.BORDER | SWT.PASSWORD | SWT.DRAW_TAB);
// passwordText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
// passwordText.setTextLimit(32);
// passwordText.addVerifyListener(new VerifyRequiredListener(passwordText, MessageFormat.format(Messages.Tips_required, Messages.Password)));
//
// CLabel passwordAgainLabel = new CLabel(compContent, SWT.NONE);
// passwordAgainLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// passwordAgainLabel.setText(Messages.PasswordConfirm + ":");
//
// passwordAgainText = new Text(compContent, SWT.BORDER | SWT.PASSWORD | SWT.DRAW_TAB);
// passwordAgainText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
// passwordAgainText.addVerifyListener(new VerifyRequiredListener(passwordText, "确认密码不能为空!"));
// passwordAgainText.setTextLimit(32);
//
// Composite initialPasswordComposite = new Composite(passwordCmposite, SWT.NONE);
// GridLayout gl_initialPasswordComposite = new GridLayout(1, false);
// gl_initialPasswordComposite.marginHeight = 0;
// initialPasswordComposite.setLayout(gl_initialPasswordComposite);
// initialPasswordComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));
//
// initialPasswordButton = new Button(initialPasswordComposite, SWT.CHECK);
// initialPasswordButton.addSelectionListener(new SelectionAdapter() {
// public void widgetSelected(SelectionEvent e) {
// initialPasswordSelectedAction();
// }
// });
// initialPasswordButton.setText(Messages.DefaultPassword);
//
// Label passwordTips = new Label(passwordCmposite, SWT.WRAP);
// GridData gd_passwordTips = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
// gd_passwordTips.widthHint = 300;
// passwordTips.setLayoutData(gd_passwordTips);
// passwordTips.setText(VerifyPasswordListener.PASSWOR_TIPS);
// passwordTips.setForeground(ColorConstants.NOTE_TIPS_COLOR);
//
// CLabel label = new CLabel(compContent, SWT.NONE);
// label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// label.setText(Messages.Gender + ":");
//
// genderComposite = new Composite(compContent, SWT.NONE);
// genderComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
// GridLayout gl_genderComposite = new GridLayout(2, false);
// gl_genderComposite.marginHeight = 0;
// genderComposite.setLayout(gl_genderComposite);
//
// Button button = new Button(genderComposite, SWT.RADIO);
// button.setSelection(true);
// button.setData(UserEnum.MALE);
// button.setText(Messages.Male);
//
// Button button_1 = new Button(genderComposite, SWT.RADIO);
// button_1.setData(UserEnum.FEMALE);
// button_1.setText(Messages.Female);
Button button = new Button(genderComposite, SWT.RADIO);
button.setSelection(true);
button.setData(UserEnum.MALE);
button.setText(Messages.Male);
CLabel label_5 = new CLabel(compContent, SWT.NONE);
label_5.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1));
label_5.setText(Messages.LinkerTel + ":");
Button button_1 = new Button(genderComposite, SWT.RADIO);
button_1.setData(UserEnum.FEMALE);
button_1.setText(Messages.Female);
phoneText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
phoneText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
phoneText.setTextLimit(20);
phoneText.addVerifyListener(new VerifyRequiredListener(phoneText,"联系电话不能为空!"));
phoneText.addVerifyListener(new VerifyPhoneListener(MessageFormat.format(Messages.Tips_pleaseEnterTheValid, Messages.LinkerTel)));
phoneText.addModifyListener(modifyListener);
CLabel IDCardLabel = new CLabel(compContent, SWT.NONE);
IDCardLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
IDCardLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false, 1, 1));
IDCardLabel.setText(Messages.IDCard + ":");
IDCardText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
IDCardText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
IDCardText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
IDCardText.setTextLimit(18);
IDCardText.addVerifyListener(new VerifyRequiredListener(IDCardText, MessageFormat.format(Messages.Tips_required, Messages.IDCard)));
// IDCardText.addVerifyListener(new VerifyRequiredListener(IDCardText, MessageFormat.format(Messages.Tips_required, Messages.IDCard)));
IDCardText.addVerifyListener(new VerifyCardIdListener(MessageFormat.format(Messages.Tips_pleaseEnterTheCorrect, Messages.IDCard)));
CLabel label_5 = new CLabel(compContent, SWT.NONE);
label_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
label_5.setText(Messages.LinkerTel + ":");
phoneText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
phoneText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
phoneText.setTextLimit(20);
// phoneText.addVerifyListener(new VerifyRequiredListener(phoneText,"联系电话不能为空!"));
phoneText.addVerifyListener(new VerifyPhoneListener(MessageFormat.format(Messages.Tips_pleaseEnterTheValid, Messages.LinkerTel)));
new Label(compContent, SWT.NONE);
CLabel label_1 = new CLabel(compContent, SWT.NONE);
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
label_1.setText(Messages.ProfessionalTitle);
professionalTitleText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
GridData gd_professionalTitleText = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
gd_professionalTitleText.widthHint = 200;
professionalTitleText.setLayoutData(gd_professionalTitleText);
// professionalTitleText.addVerifyListener(new VerifyRequiredListener(professionalTitleText,"等级/职称不能为空!"));
professionalTitleText.setTextLimit(50);
CLabel label_3 = new CLabel(compContent, SWT.NONE);
label_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
label_3.setText(Messages.Specialty+":");
specialtyText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
specialtyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
// specialtyText.addVerifyListener(new VerifyRequiredListener(specialtyText,"专业不能为空!"));
specialtyText.setTextLimit(100);
CLabel label_7 = new CLabel(compContent, SWT.NONE);
label_7.setText(Messages.AdministrativeCode);
areaCodeText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
areaCodeText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
areaCodeText.setTextLimit(50);
CLabel label_4 = new CLabel(compContent, SWT.NONE);
label_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
label_4.setText(Messages.WorkCompany+":");
companyText = new Text(compContent, SWT.BORDER | SWT.WRAP | SWT.DRAW_TAB);
companyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
companyText.setTextLimit(100);
// CLabel label_1 = new CLabel(compContent, SWT.NONE);
// label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// label_1.setText(Messages.ProfessionalTitle);
//
// professionalTitleText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
// GridData gd_professionalTitleText = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
// gd_professionalTitleText.widthHint = 200;
// professionalTitleText.setLayoutData(gd_professionalTitleText);
//// professionalTitleText.addVerifyListener(new VerifyRequiredListener(professionalTitleText,"等级/职称不能为空!"));
// professionalTitleText.setTextLimit(50);
//
// CLabel label_3 = new CLabel(compContent, SWT.NONE);
// label_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// label_3.setText(Messages.Specialty+":");
//
// specialtyText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
// specialtyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
//// specialtyText.addVerifyListener(new VerifyRequiredListener(specialtyText,"专业不能为空!"));
// specialtyText.setTextLimit(100);
//
// CLabel label_7 = new CLabel(compContent, SWT.NONE);
// label_7.setText(Messages.AdministrativeCode);
//
// areaCodeText = new Text(compContent, SWT.BORDER | SWT.DRAW_TAB);
// areaCodeText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
// areaCodeText.setTextLimit(50);
//
// CLabel label_4 = new CLabel(compContent, SWT.NONE);
// label_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
// label_4.setText(Messages.WorkCompany+":");
//
// companyText = new Text(compContent, SWT.BORDER | SWT.WRAP | SWT.DRAW_TAB);
// companyText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
// companyText.setTextLimit(100);
ESepator label_2 = new ESepator(content, SWT.SEPARATOR | SWT.HORIZONTAL);
label_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
......@@ -386,12 +383,20 @@ public class EditWorkerDialog extends EDialog {
return new Point(542, 474);
}
private void validateInputs() {
String userName = userNameText.getText().trim();
String phoneNumber = phoneText.getText().trim();
boolean isInputValid = !userName.isEmpty() && !phoneNumber.isEmpty();
saveUserBtn.setEnabled(isInputValid);
}
/**
* @Description: 初始化界面
*/
private void init(){
workerService = new WorkerService();
defaultAvatorImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/male_96.png");
// defaultAvatorImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/male_96.png");
// initComboBox();
if(null != worker && null != worker.getUserId()){
user = (AuthUser) userService.findById(worker.getUserId());
......@@ -404,16 +409,16 @@ public class EditWorkerDialog extends EDialog {
* @Description: 初始密码按钮勾选事件
* @author chenxw
*/
private void initialPasswordSelectedAction() {
boolean isDefaultPassword = initialPasswordButton.getSelection();
if (isDefaultPassword) {
passwordText.setText(DEFAULT_PASSWORD);
passwordAgainText.setText(DEFAULT_PASSWORD);
} else {
passwordText.setEnabled(!isDefaultPassword);
passwordAgainText.setEnabled(!isDefaultPassword);
}
}
// private void initialPasswordSelectedAction() {
// boolean isDefaultPassword = initialPasswordButton.getSelection();
// if (isDefaultPassword) {
// passwordText.setText(DEFAULT_PASSWORD);
// passwordAgainText.setText(DEFAULT_PASSWORD);
// } else {
// passwordText.setEnabled(!isDefaultPassword);
// passwordAgainText.setEnabled(!isDefaultPassword);
// }
// }
/**
* @Description: 刷新表单
* @author guoyr
......@@ -425,24 +430,30 @@ public class EditWorkerDialog extends EDialog {
if(null != user && null != user.getId()){
// 账号输入框不可编辑,可复制操作。
userNameText.setEditable(false);
userAccountText.setEditable(false);
passwordText.setEnabled(false);
passwordAgainText.setEnabled(false);
// userAccountText.setEditable(false);
// passwordText.setEnabled(false);
// passwordAgainText.setEnabled(false);
WidgetUtils.setControlVisible(link, false);
WidgetUtils.setControlVisible(createAccountLink, false);
WidgetUtils.setControlVisible(initialPasswordButton, false);
// WidgetUtils.setControlVisible(createAccountLink, false);
// WidgetUtils.setControlVisible(initialPasswordButton, false);
}else {
passwordText.addVerifyListener(new VerifyRequiredListener(passwordText,MessageFormat.format(Messages.Tips_required, Messages.Password)));
// passwordText.addVerifyListener(new VerifyRequiredListener(passwordText,MessageFormat.format(Messages.Tips_required, Messages.Password)));
user = new AuthUser();
user.setGender(UserEnum.MALE);
// user.setGender(UserEnum.MALE);
link.setEnabled(false);
userAccountText.setEnabled(false);
createAccountLink.setEnabled(false);
// userAccountText.setEnabled(false);
// createAccountLink.setEnabled(false);
userNameText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
link.setEnabled(userNameText.getText().length() > 1);
userAccountText.setEnabled(userNameText.getText().length() > 1);
createAccountLink.setEnabled(userNameText.getText().length() > 1);
// userAccountText.setEnabled(userNameText.getText().length() > 1);
// createAccountLink.setEnabled(userNameText.getText().length() > 1);
}
});
userNameText.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
user.setUserAccount(SpellHelper.getEname(userNameText.getText().trim()));
}
});
}
......@@ -454,28 +465,28 @@ public class EditWorkerDialog extends EDialog {
user.setUserType(UserEnum.WORKER);
}
userAccountText.setText(ObjectUtils.getObjString(user.getUserAccount()));
// userAccountText.setText(ObjectUtils.getObjString(user.getUserAccount()));
userNameText.setText(ObjectUtils.getObjString(user.getUserName()));
IDCardText.setText(ObjectUtils.getObjString(user.getUserIdcard()));
phoneText.setText(ObjectUtils.getObjString(user.getPhone()));
professionalTitleText.setText(ObjectUtils.getObjString(user.getProfessionalTitle()));
specialtyText.setText(ObjectUtils.getObjString(user.getSpecialty()));
areaCodeText.setText(ObjectUtils.getObjString(user.getAreaCode()));
companyText.setText(ObjectUtils.getObjString(user.getCompany()));
passwordText.setText(ObjectUtils.getObjString(user.getUserPassword()));
passwordAgainText.setText(ObjectUtils.getObjString(user.getUserPassword()));
// professionalTitleText.setText(ObjectUtils.getObjString(user.getProfessionalTitle()));
// specialtyText.setText(ObjectUtils.getObjString(user.getSpecialty()));
// areaCodeText.setText(ObjectUtils.getObjString(user.getAreaCode()));
// companyText.setText(ObjectUtils.getObjString(user.getCompany()));
// passwordText.setText(ObjectUtils.getObjString(user.getUserPassword()));
// passwordAgainText.setText(ObjectUtils.getObjString(user.getUserPassword()));
// WidgetUtil.setComboSelection(typeCombo, user.getUserType());
WidgetUtils.setRadioChecked(genderComposite, user.getGender());
Image image = null;
if(null != user.getAvatar()){
image = imageResolver.getImage(Base64.decode(user.getAvatar()));
}
if(null !=image){
userAvatorLabel.setImage(image,defaultAvatorImage.getBounds().width, defaultAvatorImage.getBounds().height);
}else {
userAvatorLabel.setImage(defaultAvatorImage);
}
saveUserBtn.setEnabled(true);
// WidgetUtils.setRadioChecked(genderComposite, user.getGender());
// Image image = null;
// if(null != user.getAvatar()){
// image = imageResolver.getImage(Base64.decode(user.getAvatar()));
// }
// if(null !=image){
// userAvatorLabel.setImage(image,defaultAvatorImage.getBounds().width, defaultAvatorImage.getBounds().height);
// }else {
// userAvatorLabel.setImage(defaultAvatorImage);
// }
// saveUserBtn.setEnabled(true);
}
/**
......@@ -484,65 +495,61 @@ public class EditWorkerDialog extends EDialog {
private void saveWorkerAction(){
saveUserBtn.forceFocus();
if(!saveUserBtn.getEnabled())return;
if(!ValidateUtils.checkInput(userAccountText.getParent())){
if(!ValidateUtils.checkInput(userNameText.getParent()) || !ValidateUtils.checkInput(phoneText.getParent())){
return;
}
String password = passwordText.getText().trim();
String account = userAccountText.getText().trim();
if(null == user || null == user.getId()) {
if(!VerifyPasswordListener.matcher(password)) {
MessageDialog.openWarning(getShell(), VerifyPasswordListener.PASSWOR_TIPS);
return ;
}
if (!passwordAgainText.getText().trim().equals(password)) {
MessageDialog.openWarning(getShell(), Messages.Tips_matchPassword);
passwordAgainText.setFocus();
return;
}
if (password.equals(account)) {
MessageDialog.openWarning(getShell(), "账号和密码不能相同,请重新输入!");
return;
}
}
// String password = passwordText.getText().trim();
// String account = userAccountText.getText().trim();
// if(null == user || null == user.getId()) {
// if(!VerifyPasswordListener.matcher(password)) {
// MessageDialog.openWarning(getShell(), VerifyPasswordListener.PASSWOR_TIPS);
// return ;
// }
// if (!passwordAgainText.getText().trim().equals(password)) {
// MessageDialog.openWarning(getShell(), Messages.Tips_matchPassword);
// passwordAgainText.setFocus();
// return;
// }
// if (password.equals(account)) {
// MessageDialog.openWarning(getShell(), "账号和密码不能相同,请重新输入!");
// return;
// }
// }
user.setUserName(userNameText.getText().trim());
user.setUserAccount(userAccountText.getText().trim());
// user.setUserAccount(userAccountText.getText().trim());
user.setUserIdcard(IDCardText.getText().trim());
user.setDefaultPassword(initialPasswordButton.getSelection() ? CommonEnum.YES : CommonEnum.NO);
user.setGender(ObjectUtils.getObjString(WidgetUtils.getRadioVal(genderComposite)));
user.setSpecialty(specialtyText.getText().trim());
// user.setDefaultPassword(initialPasswordButton.getSelection() ? CommonEnum.YES : CommonEnum.NO);
// user.setGender(ObjectUtils.getObjString(WidgetUtils.getRadioVal(genderComposite)));
// user.setSpecialty(specialtyText.getText().trim());
user.setPhone(phoneText.getText().trim());
user.setProfessionalTitle(professionalTitleText.getText().trim());
user.setCompany(companyText.getText().trim());
user.setAreaCode(areaCodeText.getText().trim());
if(!valAccountAndIdCard()){
return;
}
// user.setProfessionalTitle(professionalTitleText.getText().trim());
// user.setCompany(companyText.getText().trim());
// user.setAreaCode(areaCodeText.getText().trim());
user.setSource("00");
valAccountAndIdCard(user.getUserAccount(),0,true);
boolean saveFlag = false;
worker.setProjectId(null != tenderProjectEntity.getParentId() ? tenderProjectEntity.getParentId() : tenderProjectEntity.getId());
worker.setTenderId(tenderProjectEntity.getId());
worker.setMemberType(workerType);
// 修改
if(null != user.getId()){
String[] updateProperties = new String[]{"userName", "gender","userIdcard","phone","professionalTitle","specialty","areaCode","company"};
//String[] updateProperties = new String[]{"userName", "gender","userIdcard","phone","professionalTitle","specialty","areaCode","company"};
String[] updateProperties = new String[]{"userName","userIdcard","phone"};
// 如果修改了头像才去修改头像,减少修改属性,因为头像是直接保存在数据库中的
if(changeAvatorImage){
String[] newUpdateProperties = new String[updateProperties.length +1];
newUpdateProperties[updateProperties.length] = "avatar";
System.arraycopy(updateProperties, 0, newUpdateProperties, 0, updateProperties.length);
updateProperties = newUpdateProperties;
}
// if(changeAvatorImage){
// String[] newUpdateProperties = new String[updateProperties.length +1];
// newUpdateProperties[updateProperties.length] = "avatar";
// System.arraycopy(updateProperties, 0, newUpdateProperties, 0, updateProperties.length);
// updateProperties = newUpdateProperties;
// }
// 修改用户信息
saveFlag = userService.updateAssignProperty(user, updateProperties);
}else {// 新增
user.setCreateTime(NowTimeUtils.getNowDate());
user.setUserPassword(MD5Utils.getMD5String(passwordText.getText().trim()));
user.setUserPassword(MD5Utils.getMD5String("1"));
user.setUseStatus(CommonEnum.REAL_STATUS);
user.setId(UuidUtils.getUUID());
saveFlag = null != userService.createUserInfo(user);
// if(saveFlag){
// user.setId(null);
// }
userService.createUserInfo(user);
}
if(null == user){
MessageDialog.openError(getShell(), Messages.Dialog_warmTips, Messages.Tips_saveFail);
......@@ -559,6 +566,7 @@ public class EditWorkerDialog extends EDialog {
}
// 保存工作人员信息
worker = workerService.saveOrUpdateReturn(worker);
if(null == worker.getId()){
worker.setId(UuidUtils.getUUID());
saveFlag = workerService.insert(worker) > 0;
......@@ -587,45 +595,45 @@ public class EditWorkerDialog extends EDialog {
* @Description: 上传头像
* @author guoyr
*/
private void uploadUserAvatarAction(){
String imagePath = FileDialogUtils.getFileNames(SWT.SINGLE, "选择头像", new String[]{"*.png","*.jpg","*.*"});
File imageFile = new File(imagePath);
if(imageFile.exists()){
if(imageFile.length() > 1024000*1) {
MessageDialog.openWarning(getShell(), "请上传1M以内的头像!");
return;
}
Image menuImage = imageResolver.loadImage(imageFile, 102,126);
if(null != menuImage){
try {
changeAvatorImage = true;
user.setAvatar(Base64.encode(ImageResolver.getImageBytes(menuImage)));
FileInputStream in = new FileInputStream(imageFile);
user.setAvatar(Base64.encode(InputStreamUtil.inputStreamTOByte(in)));
userAvatorLabel.setImage(menuImage, 102,126);
in.close();
return;
} catch (FileNotFoundException e) {
} catch (IOException e) {
}
}
}
if(null != user.getAvatar()){
userAvatorLabel.setImage(imageResolver.getImage(Base64.decode(user.getAvatar()), 102, 126));
}else{
userAvatorLabel.setImage(defaultAvatorImage);
}
}
// private void uploadUserAvatarAction(){
// String imagePath = FileDialogUtils.getFileNames(SWT.SINGLE, "选择头像", new String[]{"*.png","*.jpg","*.*"});
// File imageFile = new File(imagePath);
// if(imageFile.exists()){
// if(imageFile.length() > 1024000*1) {
// MessageDialog.openWarning(getShell(), "请上传1M以内的头像!");
// return;
// }
// Image menuImage = imageResolver.loadImage(imageFile, 102,126);
// if(null != menuImage){
// try {
// changeAvatorImage = true;
// user.setAvatar(Base64.encode(ImageResolver.getImageBytes(menuImage)));
// FileInputStream in = new FileInputStream(imageFile);
// user.setAvatar(Base64.encode(InputStreamUtil.inputStreamTOByte(in)));
// //userAvatorLabel.setImage(menuImage, 102,126);
// in.close();
// return;
// } catch (FileNotFoundException e) {
// } catch (IOException e) {
// }
// }
// }
// if(null != user.getAvatar()){
// userAvatorLabel.setImage(imageResolver.getImage(Base64.decode(user.getAvatar()), 102, 126));
// }else{
// userAvatorLabel.setImage(defaultAvatorImage);
// }
// }
/**
* @Description: 产生账号
* @author guoyr
*/
private void createAccountAction() {
if (createAccountLink.getEnabled() && userNameText.getText().trim().length() > 1) {
userAccountText.setText(ObjectUtils.getObjString(SpellHelper.getEname(userNameText.getText().trim())));
}
}
// private void createAccountAction() {
// if (createAccountLink.getEnabled() && userNameText.getText().trim().length() > 1) {
// userAccountText.setText(ObjectUtils.getObjString(SpellHelper.getEname(userNameText.getText().trim())));
// }
// }
private void queryUserAction() {
String userName = userNameText.getText().trim();
......@@ -690,22 +698,39 @@ public class EditWorkerDialog extends EDialog {
* @author wangxiang
* @return
*/
private boolean valAccountAndIdCard(){
private void valAccountAndIdCard(String account, int index,boolean isFirstCall){
if(null != user){
if(userService.valAccountAndIdCard(user.getUserAccount(),user.getId(),null) > 0){
MessageDialog.openWarning(getShell(), user.getUserAccount()+Messages.Tips_existing_inputAgain);
userAccountText.setFocus();
return false;
}
if(null != user.getUserIdcard() && user.getUserIdcard().length() > 0){
if(userService.valAccountAndIdCard(null,user.getId(),user.getUserIdcard()) > 0){
MessageDialog.openWarning(getShell(), user.getUserIdcard()+"已经存在,每个身份证号只能对应一个账号!");
IDCardText.setFocus();
return false;
String accountToCheck;
if (isFirstCall) {
// 第一次调用时使用原始account
accountToCheck = account;
} else {
// 后续调用时使用account + index
accountToCheck = account + index;
}
if(userService.valAccountAndIdCard(accountToCheck,user.getId(),null) > 0){
//MessageDialog.openWarning(getShell(), user.getUserAccount()+Messages.Tips_existing_inputAgain);
//userAccountText.setFocus();
valAccountAndIdCard(account, index + 1, false);
}else {
if (isFirstCall) {
user.setUserAccount(account);
}else {
user.setUserAccount(account + index);
}
}
// if(null != user.getUserIdcard() && user.getUserIdcard().length() > 0){
// if(userService.valAccountAndIdCard(null,user.getId(),user.getUserIdcard()) > 0){
// MessageDialog.openWarning(getShell(), user.getUserIdcard()+"已经存在,每个身份证号只能对应一个账号!");
// IDCardText.setFocus();
//
// }
// }
}
return true;
}
/**
......
......@@ -7,6 +7,7 @@ import org.dom4j.Document;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.widgets.Display;
import com.gx.obe.action.bean.Action;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.thread.CreateEvaluationStepThread;
......@@ -29,6 +30,7 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
private Thread thread;
private TenderProjectEntity tenderProjectEntity;
private CallBack callBack;
private Action projectAction;
private Logger LOG = Logger.getLogger(EvaluationFactorXmlResolverThread.class);
private int sorNo = 1;
......@@ -50,6 +52,12 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
this.callBack = callBack;
}
public EvaluationFactorXmlResolverThread(Action projectAction, CallBack callBack){
this.tenderProjectEntity = projectAction.getTenderProject();
this.callBack = callBack;
this.projectAction = projectAction;
}
/**
* @Description: 开启线程
* @author guoyr
......@@ -88,6 +96,10 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
boolean isImport = false;
// 获得评审指标Document对象
Document factorDoc = getZbOrTbFactorDoc();
// 获得当前结构化项目标签进行判断
// if(projectAction != null) {
// parserStructProject(projectAction);
// }
List<EvaluationFactor> factorList = null;
final StringBuilder msg = new StringBuilder();
try {
......@@ -103,6 +115,7 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), factorList) > 0){
isImport = true;
LOG.debug(factorList.size() +"个评审指标导入成功!");
LOG.info(factorList.size() +"个评审指标导入成功!");
msg.append(factorList.size()+"个评审指标导入成功!\r\n");
callBack.callBackString(factorList.size() +"个评审指标导入成功!");
......@@ -153,16 +166,47 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProjectEntity.getId(), supplier.getId()) + FileConstants.PSZB_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc;
}
/**
* @Description 获取结构化项目指标
* @author lyb
* @param projectAction
*/
public void parserStructProject(Action projectAction) {
// 获得招标文件的指标Document
Document factorDoc = XmlUtils.getXmlDocument(FileConstants.getBiddingFilePath(tenderProjectEntity.getId()) + FileConstants.PST_XML);
// 未找到招标文件的指标,则获得投标文件的指标。
if(null == factorDoc){
// 获得投标人集合
List<Supplier> supplierList = supplierService.getSupplierOpenBidList(tenderProjectEntity.getId());
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProjectEntity.getId(), supplier.getId()) + FileConstants.PST_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc;
boolean isStruct = factorDoc == null ? false:ParsingXmlUtils.parsingDocStructXML(factorDoc);
tenderProjectEntity.setEvaluationParam(tenderProjectEntity.getId() + "struct", isStruct);
projectAction.setTenderProject(tenderProjectEntity);
}
}
......@@ -614,11 +614,27 @@ public abstract class BaseDateSet implements IDataSet{
}
}
public void initBidPriceResultDataSet(Map<String, Object> supplierMap, List<BidPriceResult> bidPriceResult) {
if(null != bidPriceResult && bidPriceResult.size() > 0) {
for(int i = 0; i < bidPriceResult.size(); i++) {
supplierMap.put("bidPrice" + i, bidPriceResult.get(i).getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceWithUnit" + i, bidPriceResult.get(i).getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("evaluationPrice" + i, bidPriceResult.get(i).getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPriceWithUnit" + i, bidPriceResult.get(i).getEvaluatoinPriceWithUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
String modifyReason = (String)supplierMap.get("modifyReason");
if(null == modifyReason || modifyReason.length() == 0){
modifyReason = bidPriceResult.get(i).getModifyReason();
}
supplierMap.put("modifyReason" + i, modifyReason);
}
}
}
public void initBidPriceResultDataSet(Map<String, Object> supplierMap, BidPriceResult bidPriceResult) {
if(null != bidPriceResult) {
if(null != bidPriceResult ) {
supplierMap.put("bidPrice", bidPriceResult.getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceWithUnit", bidPriceResult.getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("evaluationPrice",bidPriceResult.getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPrice", bidPriceResult.getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPriceWithUnit", bidPriceResult.getEvaluatoinPriceWithUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
String modifyReason = (String)supplierMap.get("modifyReason");
if(null == modifyReason || modifyReason.length() == 0){
......@@ -626,6 +642,8 @@ public abstract class BaseDateSet implements IDataSet{
}
supplierMap.put("modifyReason", modifyReason);
}
}
protected boolean isSameFileName(String templateFileName, String stepName){
if(null != templateFileName && templateFileName.contains(stepName.length() > 2 ? stepName.substring(0, 2) : stepName)){
......
......@@ -3,6 +3,7 @@ package com.gx.obe.report.dataset.word;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
......@@ -12,12 +13,17 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.dom4j.Document;
import com.gx.obe.action.bean.Action;
import com.gx.obe.business.entity.SupplierEvaluationStep;
import com.gx.obe.business.entity.Worker;
import com.gx.obe.business.enumeration.ExpertEnum;
import com.gx.obe.business.enumeration.SupplierEnum;
import com.gx.obe.business.enumeration.UserEnum;
import com.gx.obe.business.vo.EvaluationStepBidType;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
......@@ -31,6 +37,7 @@ import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SortUtils;
import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.util.utils.XmlUtils;
import com.gx.obe.web.entity.BidOpeningRoom;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.SupplierEvaluationResult;
......@@ -276,7 +283,11 @@ public abstract class BaseDateSet implements IWordDataSet{
if(null != wordTableList && wordTableList.size() > 0){
for(WordTable wordTable : wordTableList){
if(wordTable.isCross()){
if(null != wordTable.getRowList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
}else if(null != wordTable.getColList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
}
}else{
if(null != wordTable.getRowList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
......@@ -806,8 +817,33 @@ public abstract class BaseDateSet implements IWordDataSet{
* @param paramsMap
*/
public List<Map<String, Object>> getPriceScoreSupplierList(Map<String, String> paramsMap){
PriceScoreDateSet priceScoreDate = new PriceScoreDateSet();
boolean isStruct = parserStructProject();
PriceScoreDateSet priceScoreDate = new PriceScoreDateSet(isStruct);
priceScoreDate.init(tenderProject);
List<Map<String, Object>> tableColList;
String[] fields;
if(isStruct) {
fields = new String[] {
"投标人名称 &&supplierName0",
"开标价格 --(含税)&&bidPrice0",
"开标价格 --(不含税)&&bidPrice1",
"修正后投标报价(含税)&&evaluationPrice0",
"修正后投标报价(不含税)&&evaluationPrice1",
"修正原因(含税)&&modifyReason0",
"修正原因(不含税)&&modifyReason1",
"基准价&&basePrice",
"价格得分&&priceFinalScore"
};
}else {
fields = new String[] {
"投标人名称&&supplierName0",
"开标价格 --&&bidPrice0",
"修正后投标报价&&evaluationPrice0",
"修正原因&&modifyReason0",
"基准价&&basePrice",
"价格得分&&priceFinalScore"
};
}
List<Map<String, Object>> evaluationPriceSupplierList = new ArrayList<Map<String, Object>>();
// 价格评审
List<com.report.excel.ReportDataSet> reportDataList = priceScoreDate.getDateSetList(paramsMap, null);
......@@ -848,7 +884,6 @@ public abstract class BaseDateSet implements IWordDataSet{
priceScore=priceStep.getEvaluationFinalScore();
supplierMap.put("SourcePriFinalScore",priceScore);//复议之前的价格得分
}
supplierMap.put("sortNo", sortNo);
supplierMap.put("sortNoCN", NumericChineseUtils.getChinese(sortNo));
supplierMap.put("sort", index ++);
......@@ -856,7 +891,12 @@ public abstract class BaseDateSet implements IWordDataSet{
supplierMap.put("priceFinalScore", BigDecimalUtils.round(ObjectUtils.getObjBigDecimal(supplierMap.get("priceFinalScore")), 2));
evaluationPriceSupplierList.add(supplierMap);
}
String unit = supplierMapList.size() > 0 ? (String)((Map<String, Object>) supplierMapList.get(0).get("supplierOpeningResult")).get("priceUnit") : null;
tableColList = getTableColNameList(fields, unit);
getStructCrossData(tableColList, supplierMapList);
reportDataSet.put("tableColList", tableColList);
reportDataSet.putParam("priceScoreSupplierList", supplierMapList);
//List<Map<String,Object>> supplierOpeningResult = (List<Map<String,Object>>)supplierMapList.get(0).get("supplierOpeningResult");
reportDataSet.putParam("basePrice", _reportDataSet.getParam("basePrice"));
reportDataSet.putParam("minEvaluationPrice",evaluationPriceSupplierList.get(0).get("evaluationPrice"));
break;
......@@ -866,7 +906,32 @@ public abstract class BaseDateSet implements IWordDataSet{
return evaluationPriceSupplierList;
}
private List<Map<String, Object>> getTableColNameList(String[] fields, String unit){
List<Map<String, Object>> factorList = new ArrayList<Map<String, Object>>();
int index = 1;
for(String field : fields){
if(field.contains("--")) {
field = field.replaceAll("--", unit);
}
Map<String, Object> colMap = new HashMap<String, Object>();
String[] f = field.split("&&");
colMap.put("colName", f[0]);
colMap.put("colNameId", "colNameId" + index++);
colMap.put("colValue", f[1]);
factorList.add(colMap);
}
return factorList;
}
private void getStructCrossData(List<Map<String, Object>> tableColList, List<Map<String, Object>> supplierMapList) {
Map<String, Object> crossData = new HashMap<String, Object>();
for(Map<String, Object> factor : tableColList){
for(Map<String, Object> supplier : supplierMapList){
crossData.put(supplier.get("id").toString() + factor.get("colNameId"), supplier.get(factor.get("colValue")));
}
}
reportDataSet.putParam("priceScoreSupplierList"+"tableColList", crossData);
}
/**
* @Description: 获得供应商的评审结果列表
......@@ -1308,6 +1373,28 @@ public abstract class BaseDateSet implements IWordDataSet{
return score;
}
public boolean parserStructProject() {
// 获得招标文件的指标Document
Document factorDoc = XmlUtils.getXmlDocument(FileConstants.getBiddingFilePath(tenderProject.getId()) + FileConstants.PST_XML);
// 未找到招标文件的指标,则获得投标文件的指标。
if(null == factorDoc){
// 获得投标人集合
List<Supplier> supplierList = supplierService.getSupplierOpenBidList(tenderProject.getId());
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProject.getId(), supplier.getId()) + FileConstants.PST_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc == null ? false:ParsingXmlUtils.parsingDocStructXML(factorDoc);
}
/**
* @Description:
......
......@@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.formula.BenchmarkPriceParam;
......@@ -34,6 +35,16 @@ import com.report.excel.ReportDataSet;
*/
public class PriceScoreDateSet extends BaseDateSet{
private boolean isStruct;
public PriceScoreDateSet() {}
public PriceScoreDateSet(boolean isStruct) {
this.isStruct = isStruct;
}
public List<ReportDataSet> getDateSetList(Map<String, String> paramsMap, Map<String, String> enumsMap) {
List<ReportDataSet> reportDataList = new ArrayList<ReportDataSet>();
......@@ -97,31 +108,33 @@ public class PriceScoreDateSet extends BaseDateSet{
}
String reportName = Messages.QuotedPrice;
BidPrice bidPrice = null;
List<BidPriceResult> bidPriceResultList = null;
// BidPrice bidPrice = null;
// List<BidPriceResult> bidPriceResultList = null;
List<BidPriceResult> bidStructPriceResultList = null;
if(hasBidPriceTotal){
if(!priceEvalFactor.getBidPriceCode().equals(BidPrice.BID_PRICE_TOTAL_CODE)){
continue;
}
}else {
if(null != bidPriceList){
for(BidPrice _bidPrice : bidPriceList){
if(priceEvalFactor.getBidPriceCode().equals(_bidPrice.getBidPriceCode())){
bidPrice = _bidPrice;
break;
}
}
}
if(null != bidPrice){
reportName = bidPrice.getBidPriceName();
bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderProjectEntity.getId(), bidPrice.getId());
// if(null != bidPriceResultList && bidPriceResultList.size() > 0){
// for(BidPriceResult bidPriceResult : bidPriceResultList){
// supplierBidPriceResultMap.put(bidPriceResult.getSupplierId()+"_"+bidPriceResult.getBidPriceId(), bidPriceResult);
}
// else {
// if(null != bidPriceList){
// for(BidPrice _bidPrice : bidPriceList){
// if(priceEvalFactor.getBidPriceCode().equals(_bidPrice.getBidPriceCode())){
// bidPrice = _bidPrice;
// break;
// }
// }
}
}
// }
// if(null != bidPrice){
// reportName = bidPrice.getBidPriceName();
// bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderProjectEntity.getId(), bidPrice.getId());
//// if(null != bidPriceResultList && bidPriceResultList.size() > 0){
//// for(BidPriceResult bidPriceResult : bidPriceResultList){
//// supplierBidPriceResultMap.put(bidPriceResult.getSupplierId()+"_"+bidPriceResult.getBidPriceId(), bidPriceResult);
//// }
//// }
// }
// }
// List<Map<String, Object>> priceScoreMapList = new ArrayList<Map<String, Object>>();
// Map<String, Object> priceScoreMap = new HashMap<String, Object>();
// priceScoreMap.put("id", priceEvalFactor.getId());
......@@ -148,10 +161,13 @@ public class PriceScoreDateSet extends BaseDateSet{
List<Double> sortList = new ArrayList<Double>();
for(final Supplier supplier : supplierList){
Map<String, Object> supplierMap = Bean2MapUtils.createMap(supplier);
bidStructPriceResultList = bidPriceResultService.getBidPriceResultTableList(tenderProjectEntity.getId(), supplier.getId());
List<String> result = bidPriceList.stream().map(t -> t.getId()).collect(Collectors.toList());
bidStructPriceResultList = bidStructPriceResultList.stream().filter(p -> result.contains(p.getBidPriceId())).collect(Collectors.toList());
// 投标总报价
supplierMap.put("sortNo", "");
// 投标总报价
if(hasBidPriceTotal || ((null == bidPriceList || bidPriceList.size() == 1) && (null == bidPriceResultList || bidPriceResultList.size() == 0))){
if(hasBidPriceTotal || ((null == bidPriceList || bidPriceList.size() == 1) && (null == bidStructPriceResultList || bidStructPriceResultList.size() == 0))){
// 投标人开标结果
SupplierOpeningResult supplierOpeningResult = supplier.getSupplierOpeningResult();
......@@ -160,13 +176,17 @@ public class PriceScoreDateSet extends BaseDateSet{
}
}else {
BidPriceResult bidPriceResult = CollectionUtils.get(bidPriceResultList, t -> {
return null != t.getSupplierId() && supplier.getId().equals(t.getSupplierId());
});
if (null != bidPriceResult) {
initBidPriceResultDataSet(supplierMap, bidPriceResult);
// BidPriceResult bidPriceResult = CollectionUtils.get(bidPriceResultList, t -> {
// return null != t.getSupplierId() && supplier.getId().equals(t.getSupplierId());
// });
//
// if (null != bidPriceResult) {
//
// }
if(!isStruct) {
bidStructPriceResultList = bidStructPriceResultList.stream().filter(t -> priceEvalFactor.getBidPriceCode().equals(t.getBidPriceCode())).collect(Collectors.toList());
}
initBidPriceResultDataSet(supplierMap, bidStructPriceResultList);
}
supplierMap.put("basePriceFloat", basePriceFloat);
for(EvaluationFactorResult evaluationFactorResult : expertEvaluateFactorResultList){
......
......@@ -323,6 +323,7 @@ public class FileConstants {
public static String BID_PRICE_XML = "BidPrice.xml";
public static String SUPPLIER_SIGN_PDF = "Sign.pdf";
public static String PSZB_XML = "EvaluationFactors.xml";
public static String PST_XML = "DocProps.xml";
public static String PSD_XML = "RespItem.xml";
public static String BID_FILE_INDEX_XML = "BidFileIndex.xml";
public static String PROJECT_DATA_XML = "DataItems.xml";
......
......@@ -475,6 +475,23 @@ public class ParsingXmlUtils {
return factorList;
}
/**
* @Description: 解析基准价格节点信息
* @author lyb
* @param factorDoc
* @return
*/
public static boolean parsingDocStructXML(Document factorDoc) {
// 获取根元素
Element rootElement = factorDoc.getRootElement();
// 查找 isTemplate 元素
Element isTemplateElement = rootElement.element("isTemplate");
if (isTemplateElement != null) {
return Boolean.parseBoolean(isTemplateElement.getText());
}
return false;
}
/**
* @Description: 解析指标节点信息
* @author chenxw
......@@ -813,7 +830,7 @@ public class ParsingXmlUtils {
}
/**
* @Description: 解析价格指标参数
* @Description: 得分计算公式
* @author chenxw
* @param evaluationFactor
* @param element
......@@ -822,6 +839,8 @@ public class ParsingXmlUtils {
private static void resolverPriceFactorParams(EvaluationFactor evaluationFactor, Element element, TenderProjectEntity tenderProjectEntity) {
PriceParam priceParam = new PriceParam();
priceParam.setFormula(element.elementTextTrim("remarks"));
String priceStruct = element.element("basePriceCalcMethod").getText();
priceParam.setEvalStructMessage(priceStruct);
Element priceFormula = element.element("priceFormula");
if (null != priceFormula) {
// 基准价取样范围
......
......@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.ui,
com.gx.obe.bind;bundle-version="1.0.0",
com.gx.obe.component;bundle-version="1.0.0",
com.gx.obe.common.widget,
com.gx.obe.httputil;bundle-version="1.0.0"
com.gx.obe.httputil;bundle-version="1.0.0",
com.gx.obe.components.messages
Export-Package: com.gx.obe.evaluation.struct.enumeration,
com.gx.obe.struct,
com.gx.obe.struct.beans,
......
......@@ -4,6 +4,7 @@ package org.eclipse.swt.core.listener;
* @Description: 输入验证
* @author guoyr
*/
@FunctionalInterface
public interface VerifyValueListener{
public static String ACCEPT = "";
......
......@@ -22,6 +22,7 @@ import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
......@@ -209,6 +210,8 @@ public abstract class EDialog extends Window {
*/
private static final int VERTICAL_DIALOG_UNITS_PER_CHAR = 8;
private static Point initialMouseDownPoint;
private CallBack callBack;
/**
......@@ -544,6 +547,38 @@ public abstract class EDialog extends Window {
}
}
}
/**
* @Description: 文本框可拖拽
* @author liangyb
* @param shell
*/
public static void addDragSupport(final Shell shell) {
shell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
initialMouseDownPoint = new Point(e.x, e.y);
}
});
shell.addMouseMoveListener(new MouseMoveListener() {
@Override
public void mouseMove(MouseEvent e) {
if (initialMouseDownPoint != null) {
Point p = shell.toDisplay(e.x, e.y);
p.x -= initialMouseDownPoint.x;
p.y -= initialMouseDownPoint.y;
shell.setLocation(p);
}
}
});
shell.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
initialMouseDownPoint = null;
}
});
}
/**
* Notifies that this dialog's button with the given id has been pressed.
......
......@@ -18,6 +18,7 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import com.swtdesigner.SWTResourceManager;
......@@ -233,10 +234,11 @@ public class ELink extends CLabel {
return text;
}
public void setEnabled(boolean enabled){
if(enabled != this.enabled){
this.enabled = enabled;
this.redraw();
}
// if(enabled != this.enabled){
// this.enabled = enabled;
// this.redraw();
// }
this.enabled = enabled;
}
public boolean getEnabled(){
......
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