Commit 1ff127fa by hzc

修改null bug

parent 99432c4c
......@@ -58,8 +58,9 @@ public class TaskRuleServiceImpl implements TaskRuleService {
@Transactional(rollbackFor = Exception.class)
public void createRule(TaskRule rule) {
String orgNo = rule.getOrgNo();
int size = orgNo.length();
int orgType=0;
if(orgNo!=null&&orgNo!=""){
int size = orgNo.length();
if(size==2){
orgType = Constants.RULE_TYPE_PROVINCE;
}else if(size==4){
......@@ -67,6 +68,8 @@ public class TaskRuleServiceImpl implements TaskRuleService {
}else if(size==6){
orgType = Constants.RULE_TYPE_COUNTY;
}
}
rule.setOrgType(orgType);
rule.setState(Constants.DATA_STATE_A);
taskRuleMapper.insert(rule);
......
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